[QT6] QtConcurrent its backwards now...function, object, args

This commit is contained in:
Simon De Backer
2021-03-07 19:58:49 +01:00
parent 38a825865c
commit 332d978043
3 changed files with 15 additions and 4 deletions

View File

@@ -284,9 +284,20 @@ void ElementsCollectionModel::loadCollections(bool common_collection,
this, &ElementsCollectionModel::loadingProgressRangeChanged);
connect(watcher, &QFutureWatcher<void>::finished,
this, &ElementsCollectionModel::loadingFinished);
connect(watcher, &QFutureWatcher<void>::finished,
watcher, &QFutureWatcher<void>::deleteLater);
connect(
watcher,
&QFutureWatcher<void>::finished,
watcher,
&QFutureWatcher<void>::deleteLater);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
m_future = QtConcurrent::map(m_items_list_to_setUp, setUpData);
#else
# if TODO_LIST
# pragma message("@TODO remove code for QT 6 or later")
# endif
qDebug() << "Help code for QT 6 or later"
<< "QtConcurrent::run its backwards now...function, object, args";
#endif
watcher->setFuture(m_future);
}