summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp14
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();