mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 20:30:54 +00:00
Changed: Configure button action
--HG-- branch : develop
This commit is contained in:
parent
87ce45dcb1
commit
8f3f6075bb
1 changed files with 19 additions and 0 deletions
|
@ -98,6 +98,25 @@ void CMainWindow::onPlayClicked()
|
|||
|
||||
void CMainWindow::onConfigureClicked()
|
||||
{
|
||||
int profileIndex = profilesComboBox->currentIndex();
|
||||
|
||||
if (profileIndex < 0) return;
|
||||
|
||||
CProfile profile = CConfigFile::getInstance()->getProfile(profileIndex);
|
||||
|
||||
if (profile.server.isEmpty()) return;
|
||||
|
||||
CServer server = CConfigFile::getInstance()->getServer(profile.server);
|
||||
|
||||
if (server.configurationFilename.isEmpty()) return;
|
||||
|
||||
QStringList arguments;
|
||||
arguments << "-p";
|
||||
arguments << QString::number(profileIndex);
|
||||
|
||||
bool started = QProcess::startDetached(server.configurationFilename, arguments);
|
||||
|
||||
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
|
||||
}
|
||||
|
||||
void CMainWindow::onProfiles()
|
||||
|
|
Loading…
Reference in a new issue