summaryrefslogtreecommitdiff
path: root/src/libs/utils/aspects.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-06-23 10:27:26 +0200
committerEike Ziller <eike.ziller@qt.io>2022-06-23 08:45:24 +0000
commit1b89bcbf5e274d90737f3d0f0068164b4cb503ca (patch)
tree016b46ce415ccd45332b3a826bf37f20ea85857b /src/libs/utils/aspects.cpp
parent0ce0ad6cf9a5d9cc66007a05cad55e6f07f99dc1 (diff)
downloadqt-creator-1b89bcbf5e274d90737f3d0f0068164b4cb503ca.tar.gz
Fix application of value to StringAspect/LineEditDisplay
It was not applying the value when changing the text via a completer. That lead to confusing result where values were cut off (and also saved in the settings as such) at seemingly arbitrary cases. Ensure that the text from the line edit ends up in the aspect by also applying it on editingFinished(). One example where that exposed, was the executable aspect in the RemoteLinuxCustomRunConfiguration. Change-Id: I65c434fd675eeead76a73f680c126fd204d7c996 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs/utils/aspects.cpp')
-rw-r--r--src/libs/utils/aspects.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp
index 1af70360c1..79f6428a4a 100644
--- a/src/libs/utils/aspects.cpp
+++ b/src/libs/utils/aspects.cpp
@@ -1138,6 +1138,9 @@ void StringAspect::addToLayout(LayoutBuilder &builder)
&FancyLineEdit::textEdited,
this,
&StringAspect::setValue);
+ connect(d->m_lineEditDisplay, &FancyLineEdit::editingFinished, this, [this] {
+ setValue(d->m_lineEditDisplay->text());
+ });
}
}
if (d->m_useResetButton) {