Commit 697521fe authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt6

parent b96f5d45
Pipeline #121855 passed with stage
in 1 minute and 19 seconds
......@@ -84,7 +84,11 @@ void JournaldLocalAnalyzer::watchLogFiles(bool enabled)
mJournalWatchers.append(watcher);
mWorkerMutex.unlock();
connect(watcher, &JournalWatcher::finished, this, &JournaldLocalAnalyzer::readJournalInitialFinished);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
watcher->setFuture(QtConcurrent::run(this, &JournaldLocalAnalyzer::readJournal, mFilters));
#else
watcher->setFuture(QtConcurrent::run(&JournaldLocalAnalyzer::readJournal, this, mFilters));
#endif
} else {
for (JournalWatcher *watcher : mJournalWatchers) {
watcher->waitForFinished();
......@@ -196,7 +200,11 @@ void JournaldLocalAnalyzer::journalDescriptorUpdated(int fd)
mJournalWatchers.append(watcher);
mWorkerMutex.unlock();
connect(watcher, &JournalWatcher::finished, this, &JournaldLocalAnalyzer::readJournalUpdateFinished);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
watcher->setFuture(QtConcurrent::run(this, &JournaldLocalAnalyzer::readJournal, mFilters));
#else
watcher->setFuture(QtConcurrent::run(&JournaldLocalAnalyzer::readJournal, this, mFilters));
#endif
}
QList<JournaldLocalAnalyzer::JournalEntry> JournaldLocalAnalyzer::readJournal(const QStringList &filters)
......
Markdown is supported
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