aboutsummaryrefslogtreecommitdiff
path: root/launcher/InstanceList.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-05-02 19:10:45 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-07-10 12:17:52 +0200
commit984692dc629ca3712d482b174a67557dd9e635a8 (patch)
treedca8185a36528d94dd2c93ba8d930908271ca2cc /launcher/InstanceList.cpp
parentc1bcbf8c63ef4543fdf0d5529089721d2b4a01dd (diff)
downloadPrismLauncher-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/InstanceList.cpp')
-rw-r--r--launcher/InstanceList.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/launcher/InstanceList.cpp b/launcher/InstanceList.cpp
index 3e3c81f7..f6714614 100644
--- a/launcher/InstanceList.cpp
+++ b/launcher/InstanceList.cpp
@@ -136,7 +136,7 @@ QVariant InstanceList::data(const QModelIndex &index, int role) const
{
case InstancePointerRole:
{
- QVariant v = qVariantFromValue((void *)pdata);
+ QVariant v = QVariant::fromValue((void *)pdata);
return v;
}
case InstanceIDRole:
@@ -252,7 +252,7 @@ void InstanceList::setInstanceGroup(const InstanceId& id, const GroupId& name)
QStringList InstanceList::getGroups()
{
- return m_groupNameCache.toList();
+ return m_groupNameCache.values();
}
void InstanceList::deleteGroup(const QString& name)
@@ -353,7 +353,11 @@ QList< InstanceId > InstanceList::discoverInstances()
out.append(id);
qDebug() << "Found instance ID" << id;
}
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+ instanceSet = QSet<QString>(out.begin(), out.end());
+#else
instanceSet = out.toSet();
+#endif
m_instancesProbed = true;
return out;
}