Fix QtConcurrent use for future Qt version

Qt 6 has a breaking ABI change in relation to QtConcurrent::run()
https://doc.qt.io/qt-6/concurrent-changes-qt6.html
This commit is contained in:
Floris Bos 2021-12-21 22:50:13 +01:00
parent 47d331b664
commit 69f5799145
2 changed files with 8 additions and 0 deletions

View file

@ -171,7 +171,11 @@ void DownloadExtractThread::extractImageRun()
}
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
_writeFuture = QtConcurrent::run(&DownloadThread::_writeFile, static_cast<DownloadThread *>(this), _abuf[_activeBuf], size);
#else
_writeFuture = QtConcurrent::run(static_cast<DownloadThread *>(this), &DownloadThread::_writeFile, _abuf[_activeBuf], size);
#endif
_activeBuf = _activeBuf ? 0 : 1;
_writeThreadStarted = true;
}