aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/atlauncher
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-10-22 15:31:53 +0200
committerGitHub <noreply@github.com>2022-10-22 15:31:53 +0200
commit24e4db676a57d1713a95b2ddda8f7a0cb1c9dc6a (patch)
treedfb008a6755f710f761efb0d22f0c86de107f3d5 /launcher/ui/pages/modplatform/atlauncher
parent6e21a9829de0f05aae5a9afd572ada14120a02f0 (diff)
parenta4f4f2891c8127c86365b1f36cf2982e1cfafa2c (diff)
downloadPrismLauncher-24e4db676a57d1713a95b2ddda8f7a0cb1c9dc6a.tar.gz
PrismLauncher-24e4db676a57d1713a95b2ddda8f7a0cb1c9dc6a.tar.bz2
PrismLauncher-24e4db676a57d1713a95b2ddda8f7a0cb1c9dc6a.zip
Merge pull request #224 from jamierocks/atl-abort-close-optional-mods-dialog
Diffstat (limited to 'launcher/ui/pages/modplatform/atlauncher')
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp7
-rw-r--r--launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp
index 03196685..c68e40ba 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp
@@ -43,10 +43,13 @@ AtlUserInteractionSupportImpl::AtlUserInteractionSupportImpl(QWidget *parent) :
{
}
-QVector<QString> AtlUserInteractionSupportImpl::chooseOptionalMods(ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods)
+std::optional<QVector<QString>> AtlUserInteractionSupportImpl::chooseOptionalMods(ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods)
{
AtlOptionalModDialog optionalModDialog(m_parent, version, mods);
- optionalModDialog.exec();
+ auto result = optionalModDialog.exec();
+ if (result == QDialog::Rejected) {
+ return {};
+ }
return optionalModDialog.getResult();
}
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h
index aa22fc73..3b37c9be 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h
@@ -47,7 +47,7 @@ public:
private:
QString chooseVersion(Meta::VersionListPtr vlist, QString minecraftVersion) override;
- QVector<QString> chooseOptionalMods(ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods) override;
+ std::optional<QVector<QString>> chooseOptionalMods(ATLauncher::PackVersion version, QVector<ATLauncher::VersionMod> mods) override;
void displayMessage(QString message) override;
private: