From 8c050eaad92060fcebeb1c2caaa9d620ff960389 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 22 Apr 2022 16:18:54 +0200 Subject: [PATCH] CMake: Set the build directory change after Browse As an user I expect when I select Browse for the build directory that after the directory has been chosen it will be taken into consideration. Amends 1d600101ee81305d2d085920988a1cbd33f5b00e Fixes: QTCREATORBUG-27407 Change-Id: I331b6095c176f57ca8e4c73c0b378a11ce3d6dbc Reviewed-by: Reviewed-by: Eike Ziller --- src/libs/utils/aspects.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp index a4d632b7e4d..8159903db57 100644 --- a/src/libs/utils/aspects.cpp +++ b/src/libs/utils/aspects.cpp @@ -1088,13 +1088,15 @@ void StringAspect::addToLayout(LayoutBuilder &builder) useMacroExpander(d->m_pathChooserDisplay->lineEdit()); if (isAutoApply()) { if (d->m_autoApplyOnEditingFinished) { - connect(d->m_pathChooserDisplay, &PathChooser::editingFinished, this, [this] { + const auto setPathChooserValue = [this] { if (d->m_blockAutoApply) return; d->m_blockAutoApply = true; setValue(d->m_pathChooserDisplay->filePath().toString()); d->m_blockAutoApply = false; - }); + }; + connect(d->m_pathChooserDisplay, &PathChooser::editingFinished, this, setPathChooserValue); + connect(d->m_pathChooserDisplay, &PathChooser::browsingFinished, this, setPathChooserValue); } else { connect(d->m_pathChooserDisplay, &PathChooser::pathChanged, this, [this](const QString &path) {