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>
This commit is contained in:
Eike Ziller
2022-06-23 10:27:26 +02:00
parent 0ce0ad6cf9
commit 1b89bcbf5e

View File

@@ -1138,6 +1138,9 @@ void StringAspect::addToLayout(LayoutBuilder &builder)
&FancyLineEdit::textEdited, &FancyLineEdit::textEdited,
this, this,
&StringAspect::setValue); &StringAspect::setValue);
connect(d->m_lineEditDisplay, &FancyLineEdit::editingFinished, this, [this] {
setValue(d->m_lineEditDisplay->text());
});
} }
} }
if (d->m_useResetButton) { if (d->m_useResetButton) {