aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/legacy_ftb
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-05-02 21:34:55 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-07-10 12:19:15 +0200
commitc36342371819a4983b5ac2b928acc6a78b857ed8 (patch)
tree925d5ef6756a205feddc40864c0717e0c6472d44 /launcher/modplatform/legacy_ftb
parente58158c3cd629717a9742fe08da9b09ed39bc198 (diff)
downloadPrismLauncher-c36342371819a4983b5ac2b928acc6a78b857ed8.tar.gz
PrismLauncher-c36342371819a4983b5ac2b928acc6a78b857ed8.tar.bz2
PrismLauncher-c36342371819a4983b5ac2b928acc6a78b857ed8.zip
refactor: fix deprecation up to Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/modplatform/legacy_ftb')
-rw-r--r--launcher/modplatform/legacy_ftb/PackFetchTask.cpp2
-rw-r--r--launcher/modplatform/legacy_ftb/PackInstallTask.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/launcher/modplatform/legacy_ftb/PackFetchTask.cpp b/launcher/modplatform/legacy_ftb/PackFetchTask.cpp
index 961fe868..5bc01ed2 100644
--- a/launcher/modplatform/legacy_ftb/PackFetchTask.cpp
+++ b/launcher/modplatform/legacy_ftb/PackFetchTask.cpp
@@ -103,7 +103,7 @@ bool PackFetchTask::parseAndAddPacks(QByteArray &data, PackType packType, Modpac
if(!doc.setContent(data, false, &errorMsg, &errorLine, &errorCol))
{
- auto fullErrMsg = QString("Failed to fetch modpack data: %1 %2:3d!").arg(errorMsg, errorLine, errorCol);
+ auto fullErrMsg = QString("Failed to fetch modpack data: %1 %2:%3!").arg(errorMsg).arg(errorLine).arg(errorCol);
qWarning() << fullErrMsg;
data.clear();
return false;
diff --git a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
index c63a9f1e..1493e8f2 100644
--- a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
+++ b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
@@ -88,7 +88,11 @@ void PackInstallTask::unzip()
return;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ m_extractFuture = QtConcurrent::run(QThreadPool::globalInstance(), QOverload<QString, QString>::of(MMCZip::extractDir), archivePath, extractDir.absolutePath() + "/unzip");
+#else
m_extractFuture = QtConcurrent::run(QThreadPool::globalInstance(), MMCZip::extractDir, archivePath, extractDir.absolutePath() + "/unzip");
+#endif
connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::finished, this, &PackInstallTask::onUnzipFinished);
connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::canceled, this, &PackInstallTask::onUnzipCanceled);
m_extractFutureWatcher.setFuture(m_extractFuture);