diff --git a/downloadextractthread.cpp b/downloadextractthread.cpp index 38e3370..7e58818 100644 --- a/downloadextractthread.cpp +++ b/downloadextractthread.cpp @@ -171,7 +171,11 @@ void DownloadExtractThread::extractImageRun() } } +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + _writeFuture = QtConcurrent::run(&DownloadThread::_writeFile, static_cast(this), _abuf[_activeBuf], size); +#else _writeFuture = QtConcurrent::run(static_cast(this), &DownloadThread::_writeFile, _abuf[_activeBuf], size); +#endif _activeBuf = _activeBuf ? 0 : 1; _writeThreadStarted = true; } diff --git a/downloadthread.cpp b/downloadthread.cpp index 647339f..067d2aa 100644 --- a/downloadthread.cpp +++ b/downloadthread.cpp @@ -526,7 +526,11 @@ size_t DownloadThread::_writeFile(const char *buf, size_t len) return _file.seek(len) ? len : 0; } +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QFuture wh = QtConcurrent::run(&DownloadThread::_hashData, this, buf, len); +#else QFuture wh = QtConcurrent::run(this, &DownloadThread::_hashData, buf, len); +#endif qint64 written = _file.write(buf, len); _bytesWritten += written;