Commit 482ac715 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some compile error against qt6

parent 7f921f1c
Pipeline #135616 passed with stage
in 2 minutes and 8 seconds
......@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <QApplication>
#include <QCheckBox>
#include <QComboBox>
#include <QDesktopWidget>
//#include <QDesktopWidget>
#include <QDialogButtonBox>
#include <QFontDatabase>
#include <QHBoxLayout>
......
......@@ -82,7 +82,11 @@ bool DocumentJob::checkDocumentEditor()
void ThreadedDocumentJob::doStart()
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QFuture<void> future = QtConcurrent::run(this, &ThreadedDocumentJob::threadedStart);
#else
QFuture<void> future = QtConcurrent::run(&ThreadedDocumentJob::threadedStart, this);
#endif
auto watcher = new QFutureWatcher<void>(this);
connect(watcher, SIGNAL(finished()), SLOT(emitResult()));
watcher->setFuture(future);
......
......@@ -157,7 +157,11 @@ struct LoadingDocumentImplPrivate {
// https://bugs.kde.org/show_bug.cgi?id=289819
//
mFormatHint = mMimeType.preferredSuffix().toLocal8Bit().toLower();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
mMetaInfoFuture = QtConcurrent::run(this, &LoadingDocumentImplPrivate::loadMetaInfo);
#else
mMetaInfoFuture = QtConcurrent::run(&LoadingDocumentImplPrivate::loadMetaInfo, this);
#endif
mMetaInfoFutureWatcher.setFuture(mMetaInfoFuture);
break;
......@@ -180,7 +184,11 @@ struct LoadingDocumentImplPrivate {
Q_ASSERT(mMetaInfoLoaded);
Q_ASSERT(mImageDataInvertedZoom != 0);
Q_ASSERT(!mImageDataFuture.isRunning());
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
mImageDataFuture = QtConcurrent::run(this, &LoadingDocumentImplPrivate::loadImageData);
#else
mImageDataFuture = QtConcurrent::run(&LoadingDocumentImplPrivate::loadImageData, this);
#endif
mImageDataFutureWatcher.setFuture(mImageDataFuture);
}
......
......@@ -110,8 +110,11 @@ void SaveJob::doStart()
emitResult();
return;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QFuture<void> future = QtConcurrent::run(this, &SaveJob::saveInternal);
#else
QFuture<void> future = QtConcurrent::run(&SaveJob::saveInternal, this);
#endif
d->mInternalSaveWatcher.reset(new QFutureWatcher<void>(this));
connect(d->mInternalSaveWatcher.data(), &QFutureWatcherBase::finished, this, &SaveJob::finishSave);
d->mInternalSaveWatcher->setFuture(future);
......
......@@ -21,11 +21,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef MIMETYPEUTILS_H
#define MIMETYPEUTILS_H
#include <QString>
#include <QStringList>
#include <lib/gwenviewlib_export.h>
// Local
class QStringList;
class KFileItem;
class KFileItemList;
class QUrl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment