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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user