diff --git a/launcher/modplatform/helpers/HashUtils.cpp b/launcher/modplatform/helpers/HashUtils.cpp index f20af1f09..a3b8d904c 100644 --- a/launcher/modplatform/helpers/HashUtils.cpp +++ b/launcher/modplatform/helpers/HashUtils.cpp @@ -18,8 +18,7 @@ Hasher::Ptr createHasher(QString file_path, ModPlatform::ResourceProvider provid case ModPlatform::ResourceProvider::FLAME: return makeShared(file_path, Algorithm::Murmur2); default: - qCritical() << "[Hashing]" - << "Unrecognized mod platform!"; + qCritical() << "[Hashing]" << "Unrecognized mod platform!"; return nullptr; } } @@ -138,7 +137,8 @@ QString hash(QByteArray data, Algorithm type) void Hasher::executeTask() { - m_future = QtConcurrent::run(QThreadPool::globalInstance(), [this]() { return hash(m_path, m_alg); }); + m_future = QtConcurrent::run( + QThreadPool::globalInstance(), [](QString fileName, Algorithm type) { return hash(fileName, type); }, m_path, m_alg); connect(&m_watcher, &QFutureWatcher::finished, this, [this] { if (m_future.isCanceled()) { emitAborted();