From b52177119fa20ee53afc5c4a8cc8f6fec6a5ffe1 Mon Sep 17 00:00:00 2001 From: Knud Dollereder Date: Thu, 28 Jul 2022 14:16:59 +0200 Subject: [PATCH] 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: Reviewed-by: Tim Jenssen --- .../components/timelineeditor/timelineform.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp index db9e8a8ef64..e3bcef39424 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelineform.cpp @@ -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 {