summaryrefslogtreecommitdiff
path: root/src/installationmanager.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2023-09-20 20:44:20 -0500
committerJeremy Rimpo <jeremy.rimpo@servermonkey.com>2023-09-21 17:35:08 -0500
commit049a7e2efd4a42437cc6e06b59d9a28cc65457bc (patch)
tree1949bc3f5bf12c4cf4278bb7c72eefe3250f23b7 /src/installationmanager.cpp
parentf8b015220d7b743bdf6829fae610e7dfe33cf176 (diff)
Dialogs and bugfixes
Diffstat (limited to 'src/installationmanager.cpp')
-rw-r--r--src/installationmanager.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp
index 901c636c..3f247b38 100644
--- a/src/installationmanager.cpp
+++ b/src/installationmanager.cpp
@@ -667,20 +667,21 @@ InstallationResult InstallationManager::install(const QString& fileName,
if (category != 0 && categoryIndex == 0U &&
Settings::instance().nexus().categoryMappings()) {
QMessageBox nexusQuery;
+ nexusQuery.setWindowTitle(tr("No category found"));
nexusQuery.setText(tr(
"This Nexus category has not yet been mapped. Do you wish to proceed without "
"setting a category, proceed and disable automatic Nexus mappings, or stop "
"and configure your category mappings?"));
- nexusQuery.addButton(tr("&Proceed"), QMessageBox::YesRole);
- nexusQuery.addButton(tr("&Disable"), QMessageBox::AcceptRole);
- nexusQuery.addButton(tr("&Stop && Configure"), QMessageBox::DestructiveRole);
- auto ret = nexusQuery.exec();
- switch (ret) {
- case 1:
+ QPushButton* proceedButton =
+ nexusQuery.addButton(tr("&Proceed"), QMessageBox::YesRole);
+ QPushButton* disableButton =
+ nexusQuery.addButton(tr("&Disable"), QMessageBox::AcceptRole);
+ QPushButton* stopButton =
+ nexusQuery.addButton(tr("&Stop && Configure"), QMessageBox::DestructiveRole);
+ nexusQuery.exec();
+ if (nexusQuery.clickedButton() == disableButton) {
Settings::instance().nexus().setCategoryMappings(false);
- case 0:
- break;
- case 2:
+ } else if (nexusQuery.clickedButton() == stopButton) {
return MOBase::IPluginInstaller::RESULT_CATEGORYREQUESTED;
}
} else {