From: Alexander Golubev Date: Sat, 26 Jan 2019 14:48:39 +0000 (+0300) Subject: pathbar: fix an issue with a slot recursive call X-Git-Tag: archive/raspbian/0.14.0-3+rpi1~1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7f9bead20963b0b207d744cd41c10e493b50b080;p=libfm-qt.git pathbar: fix an issue with a slot recursive call Closes #225 Gbp-Pq: Name pathbar-recursive-call-slot.patch --- 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();