Commit aa62130a authored by Volker Krause's avatar Volker Krause
Browse files

Adapt to QtConcurrent changes in Qt6

Accessing the QFuture result is no longer implicit, and run() changed
the argument order.
parent f4d444bb
Pipeline #146978 passed with stage
in 8 minutes and 22 seconds
......@@ -33,7 +33,7 @@ void ActivityJob::start()
if (name.isEmpty()) {
name = i18n("unnamed");
}
const QString activityId = m_activityController->addActivity(name);
const QString activityId = m_activityController->addActivity(name).result();
setResult(activityId);
return;
}
......
......@@ -119,7 +119,11 @@ void ClipboardJob::start()
watcher->deleteLater();
delete code;
});
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
auto future = QtConcurrent::run(code, &Prison::AbstractBarcode::toImage, QSizeF(pixelWidth, pixelHeight));
#else
auto future = QtConcurrent::run(&Prison::AbstractBarcode::toImage, code, QSizeF(pixelWidth, pixelHeight));
#endif
watcher->setFuture(future);
return;
} else {
......
......@@ -349,7 +349,11 @@ void Klipper::loadSettings()
m_saveFileTimer->setSingleShot(true);
m_saveFileTimer->setInterval(5000);
connect(m_saveFileTimer, &QTimer::timeout, this, [this] {
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QtConcurrent::run(this, &Klipper::saveHistory, false);
#else
QtConcurrent::run(&Klipper::saveHistory, this, false);
#endif
});
connect(m_history, &History::changed, m_saveFileTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
} else {
......
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