From 869c72ab70805a2ea1cbb6f008c83d5ea6a093be Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Tue, 22 Aug 2017 22:15:57 +0200 Subject: [PATCH] logic: Fixed deadlock when interrupting indexing --- src/lib_gui/qt/view/QtDialogView.cpp | 14 +++++++------- src/lib_gui/qt/view/QtDialogView.h | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lib_gui/qt/view/QtDialogView.cpp b/src/lib_gui/qt/view/QtDialogView.cpp index b9cb60ea..2b859b3a 100644 --- a/src/lib_gui/qt/view/QtDialogView.cpp +++ b/src/lib_gui/qt/view/QtDialogView.cpp @@ -31,7 +31,7 @@ void QtDialogView::showUnknownProgressDialog(const std::string& title, const std { MessageStatus(title + ": " + message, false, true).dispatch(); - m_onQtThread( + m_onQtThread2( [=]() { QtIndexingDialog* window = dynamic_cast(m_windowStack.getTopWindow()); @@ -55,7 +55,7 @@ void QtDialogView::hideUnknownProgressDialog() { MessageStatus("", false, false).dispatch(); - m_onQtThread( + m_onQtThread2( [=]() { QtIndexingDialog* window = dynamic_cast(m_windowStack.getTopWindow()); @@ -196,7 +196,7 @@ void QtDialogView::finishedIndexingDialog( void QtDialogView::hideDialogs() { - m_onQtThread( + m_onQtThread2( [=]() { m_windowStack.clearWindows(); @@ -212,7 +212,7 @@ int QtDialogView::confirm(const std::string& message, const std::vector(m_windowStack.getTopWindow()); @@ -275,7 +275,7 @@ void QtDialogView::handleMessage(MessageNewErrors* message) { ErrorCountInfo errorInfo = m_storageAccess->getErrorCount(); - m_onQtThread2( + m_onQtThread3( [=]() { updateErrorCount(errorInfo.total, errorInfo.fatal); @@ -292,7 +292,7 @@ void QtDialogView::handleMessage(MessageShowErrors* message) ErrorCountInfo errorInfo = message->errorCount; - m_onQtThread2( + m_onQtThread3( [=]() { updateErrorCount(errorInfo.total, errorInfo.fatal); diff --git a/src/lib_gui/qt/view/QtDialogView.h b/src/lib_gui/qt/view/QtDialogView.h index a408aba0..3a2cdb93 100644 --- a/src/lib_gui/qt/view/QtDialogView.h +++ b/src/lib_gui/qt/view/QtDialogView.h @@ -69,6 +69,7 @@ private: QtThreadedLambdaFunctor m_onQtThread; QtThreadedLambdaFunctor m_onQtThread2; + QtThreadedLambdaFunctor m_onQtThread3; bool m_resultReady; };