aboutsummaryrefslogtreecommitdiff
path: root/launcher/net/NetJob.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/net/NetJob.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/net/NetJob.cpp')
-rw-r--r--launcher/net/NetJob.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/launcher/net/NetJob.cpp b/launcher/net/NetJob.cpp
index df899178..34927369 100644
--- a/launcher/net/NetJob.cpp
+++ b/launcher/net/NetJob.cpp
@@ -97,7 +97,12 @@ auto NetJob::abort() -> bool
bool fullyAborted = true;
// fail all downloads on the queue
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+ QSet<int> todoSet(m_todo.begin(), m_todo.end());
+ m_failed.unite(todoSet);
+#else
m_failed.unite(m_todo.toSet());
+#endif
m_todo.clear();
// abort active downloads