diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-02 19:10:45 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-10 12:17:52 +0200 |
commit | 984692dc629ca3712d482b174a67557dd9e635a8 (patch) | |
tree | dca8185a36528d94dd2c93ba8d930908271ca2cc /launcher/ui/dialogs/NewInstanceDialog.cpp | |
parent | c1bcbf8c63ef4543fdf0d5529089721d2b4a01dd (diff) | |
download | PrismLauncher-984692dc629ca3712d482b174a67557dd9e635a8.tar.gz PrismLauncher-984692dc629ca3712d482b174a67557dd9e635a8.tar.bz2 PrismLauncher-984692dc629ca3712d482b174a67557dd9e635a8.zip |
refactor: fix deprecation up to Qt 5.15
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/ui/dialogs/NewInstanceDialog.cpp')
-rw-r--r-- | launcher/ui/dialogs/NewInstanceDialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/launcher/ui/dialogs/NewInstanceDialog.cpp b/launcher/ui/dialogs/NewInstanceDialog.cpp index 05ea091d..c7bcfe6e 100644 --- a/launcher/ui/dialogs/NewInstanceDialog.cpp +++ b/launcher/ui/dialogs/NewInstanceDialog.cpp @@ -54,8 +54,14 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString InstIconKey = "default"; ui->iconButton->setIcon(APPLICATION->icons()->getIcon(InstIconKey)); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + auto groupList = APPLICATION->instances()->getGroups(); + auto groups = QSet<QString>(groupList.begin(), groupList.end()); + groupList = groups.values(); +#else auto groups = APPLICATION->instances()->getGroups().toSet(); auto groupList = QStringList(groups.toList()); +#endif groupList.sort(Qt::CaseInsensitive); groupList.removeOne(""); groupList.push_front(initialGroup); |