Fix wrong optimization in the timeline settings dialog

The timeline settings dialog used a static QString to cache the
last inserted expression binding value.
This caching fails when the user modifies the expression in the
text editor since the cached string is not updated in that case.
This patch removes the caching since this optimization is negligible.

Fixes: QDS-7162
Change-Id: I0122b29180afbfe5b867063139c924efa6e17ea3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Knud Dollereder
2022-07-28 14:16:59 +02:00
parent 5f9c30cacf
commit b52177119f

View File

@@ -50,16 +50,7 @@ TimelineForm::TimelineForm(QWidget *parent)
connect(ui->expressionBindingLineEdit, &QLineEdit::editingFinished, [this]() {
QTC_ASSERT(m_timeline.isValid(), return );
static QString lastString;
const QString bindingText = ui->expressionBindingLineEdit->text();
if (bindingText == lastString)
return;
lastString = bindingText;
if (bindingText.isEmpty()) {
ui->animation->setChecked(true);
try {