diff options
| author | AL <26797547+Al12rs@users.noreply.github.com> | 2020-06-07 17:44:06 +0200 |
|---|---|---|
| committer | AL <26797547+Al12rs@users.noreply.github.com> | 2020-06-07 17:44:06 +0200 |
| commit | d1c42e69c1819def3098bfac0fd96f2eb39226e9 (patch) | |
| tree | 028dea7baf8d3e7f4e4012b4454ce5a1fc4f20c9 /src/mainwindow.cpp | |
| parent | 0dc66e7ff4e4561d7b7f9ffbc3158a0e1bf5a2ec (diff) | |
Make even the last direct call to checkForProblemsImpl use the async version.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9559583b..4a5175e6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1098,15 +1098,15 @@ bool MainWindow::errorReported(QString &logFile) return false; } -void MainWindow::checkForProblemsAsync() { - QtConcurrent::run([this]() { - checkForProblems(); +QFuture<void> MainWindow::checkForProblemsAsync() { + return QtConcurrent::run([this]() { + checkForProblemsImpl(); }); } -void MainWindow::checkForProblems() +void MainWindow::checkForProblemsImpl() { - TimeThis tt("MainWindow::checkForProblems()"); + TimeThis tt("MainWindow::checkForProblemsImpl()"); { QMutexLocker lk(&m_CheckForProblemsMutex); if (m_CheckingForProblems) { @@ -5886,7 +5886,9 @@ void MainWindow::on_bsaList_itemChanged(QTreeWidgetItem*, int) void MainWindow::on_actionNotifications_triggered() { - checkForProblems(); + auto future = checkForProblemsAsync(); + + future.waitForFinished(); ProblemsDialog problems(m_PluginContainer.plugins<QObject>(), this); problems.exec(); |
