summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2022-04-22 16:18:54 +0200
committerCristian Adam <cristian.adam@qt.io>2022-04-26 13:24:48 +0000
commit8c050eaad92060fcebeb1c2caaa9d620ff960389 (patch)
treef797b82a40e855d9ca8b1679da3da26ab077cd70
parent099f02b5db2b4256b9238c3a27173c458da6f95e (diff)
downloadqt-creator-8c050eaad92060fcebeb1c2caaa9d620ff960389.tar.gz
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: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/libs/utils/aspects.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp
index a4d632b7e4..8159903db5 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) {