various: ensure qt 5 compatibility

This commit is contained in:
itsmattkc
2022-10-31 18:18:49 -07:00
parent e94580c369
commit c5a86af181
6 changed files with 37 additions and 21 deletions
+7 -1
View File
@@ -56,7 +56,13 @@ void TaskDialog::showEvent(QShowEvent *e)
this, &TaskDialog::TaskFinished, Qt::QueuedConnection);
// Run task in another thread with QtConcurrent
task_watcher->setFuture(QtConcurrent::run(&Task::Start, task_));
task_watcher->setFuture(
#if QT_VERSION_MAJOR >= 6
QtConcurrent::run(&Task::Start, task_)
#else
QtConcurrent::run(task_, &Task::Start)
#endif
);
already_shown_ = true;
}