From 7f9bead20963b0b207d744cd41c10e493b50b080 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Sat, 26 Jan 2019 17:48:39 +0300 Subject: [PATCH] pathbar: fix an issue with a slot recursive call Closes #225 Gbp-Pq: Name pathbar-recursive-call-slot.patch --- src/pathbar.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pathbar.cpp b/src/pathbar.cpp index c498c31..c9230f7 100644 --- a/src/pathbar.cpp +++ b/src/pathbar.cpp @@ -314,6 +314,9 @@ void PathBar::closeEditor() { } // If a menu has popped up synchronously (with QMenu::exec), the path buttons may be drawn // but the path-edit may not disappear until the menu is closed. So, we hide it here. + // However, since hiding the path-edit makes it lose focus and emit editingFinished(), + // we should first disconnect from it to avoid recursive calling of the current function. + tempPathEdit_->disconnect(); tempPathEdit_->setVisible(false); delete layout()->replaceWidget(tempPathEdit_, scrollArea_, Qt::FindDirectChildrenOnly); scrollArea_->show(); -- 2.30.2