From 8c050eaad92060fcebeb1c2caaa9d620ff960389 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 22 Apr 2022 16:18:54 +0200 Subject: [PATCH 1/2] 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) { From b748f531eec7745a6c0f99ff45d70c659e669f47 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Wed, 27 Apr 2022 09:40:43 +0200 Subject: [PATCH 2/2] ManhattanStyle: Check widget being not null In case someone calls styleHint(SH_Widget_Animation_Duration) without a widget. Change-Id: If331f2365050b18fd6b06ce764c9ccbc7eede08a Reviewed-by: Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/manhattanstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index d4a4cdbe6f5..bf182d80b8a 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -409,7 +409,7 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const ret = QFormLayout::AllNonFixedFieldsGrow; break; case QStyle::SH_Widget_Animation_Duration: - if (widget->inherits("QTreeView")) + if (widget && widget->inherits("QTreeView")) ret = 0; break; default: