chore: remove qt version checks from code

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2025-04-10 12:03:50 +03:00
parent 59bd6a915b
commit 442aae88ce
27 changed files with 2 additions and 182 deletions

View File

@@ -678,13 +678,8 @@ void PackInstallTask::extractConfigs()
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() + "/minecraft");
#else
m_extractFuture =
QtConcurrent::run(QThreadPool::globalInstance(), MMCZip::extractDir, archivePath, extractDir.absolutePath() + "/minecraft");
#endif
connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::finished, this, [this]() { downloadMods(); });
connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::canceled, this, [this]() { emitAborted(); });
m_extractFutureWatcher.setFuture(m_extractFuture);
@@ -897,13 +892,8 @@ void PackInstallTask::onModsDownloaded()
jobPtr.reset();
if (!modsToExtract.empty() || !modsToDecomp.empty() || !modsToCopy.empty()) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
m_modExtractFuture =
QtConcurrent::run(QThreadPool::globalInstance(), &PackInstallTask::extractMods, this, modsToExtract, modsToDecomp, modsToCopy);
#else
m_modExtractFuture =
QtConcurrent::run(QThreadPool::globalInstance(), this, &PackInstallTask::extractMods, modsToExtract, modsToDecomp, modsToCopy);
#endif
connect(&m_modExtractFutureWatcher, &QFutureWatcher<QStringList>::finished, this, &PackInstallTask::onModsExtracted);
connect(&m_modExtractFutureWatcher, &QFutureWatcher<QStringList>::canceled, this, &PackInstallTask::emitAborted);
m_modExtractFutureWatcher.setFuture(m_modExtractFuture);