diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-06-07 19:26:54 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-06-15 14:40:39 -0400 |
| commit | fafdb146004401355db5245cc1f7c241c00cf991 (patch) | |
| tree | f4cf3fd832369e705d57da7158ff67c215ee3081 /src/mainwindow.cpp | |
| parent | 65ad374d9769524a62ac423b7d73661e42163265 (diff) | |
fixed EditExecutablesDialog being opened without a parent
removed Executable's constructor with values, replaced with default ctor + setters, all these strings were much too error-prone
added Executable ctor overload to convert from ExecutableInfo
plugin executables now override most of the custom changes
renamed browseButton to browseBinaryButton to avoid confusion with the other browseDirButton
fixed both browse dialogs not handling cancel
EditExecutablesDialog's list used to change the text color for custom executables, replaced with italics
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 926ba43c..267a2971 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2483,7 +2483,9 @@ bool MainWindow::modifyExecutablesDialog() EditExecutablesDialog dialog(*m_OrganizerCore.executablesList(), *m_OrganizerCore.modList(), m_OrganizerCore.currentProfile(), - m_OrganizerCore.managedGame()); + m_OrganizerCore.managedGame(), + this); + QSettings &settings = m_OrganizerCore.settings().directInterface(); QString key = QString("geometry/%1").arg(dialog.objectName()); if (settings.contains(key)) { @@ -5507,9 +5509,12 @@ void MainWindow::addAsExecutable() if (!name.isEmpty()) { //Note: If this already exists, you'll lose custom settings - m_OrganizerCore.executablesList()->setExecutable({ - name, binaryInfo, arguments, targetInfo.absolutePath(), QString(), - Executable::CustomExecutable}); + m_OrganizerCore.executablesList()->setExecutable(Executable() + .title(name) + .binaryInfo(binaryInfo) + .arguments(arguments) + .workingDirectory(targetInfo.absolutePath()) + .flags(Executable::CustomExecutable)); refreshExecutablesList(); } |
