diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2010-04-29 15:07:08 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2010-04-29 15:10:07 (GMT) |
commit | 801065f55c1232fddccfcf4a434b709080a3baed (patch) | |
tree | 4bf64ea10df98fb8d60a943d4a12674e2e901a83 /tools | |
parent | 04caa2c0ceef3d78c69b94c97867ead1c817bfbc (diff) | |
download | Qt-801065f55c1232fddccfcf4a434b709080a3baed.zip Qt-801065f55c1232fddccfcf4a434b709080a3baed.tar.gz Qt-801065f55c1232fddccfcf4a434b709080a3baed.tar.bz2 |
Backport a fix to Designer filterwidget
Using static here is obviously incorrect as the animations
are done per widget.
Reviewed-by: danimo
Diffstat (limited to 'tools')
-rw-r--r-- | tools/designer/src/lib/shared/filterwidget.cpp | 5 | ||||
-rw-r--r-- | tools/designer/src/lib/shared/filterwidget_p.h | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/designer/src/lib/shared/filterwidget.cpp b/tools/designer/src/lib/shared/filterwidget.cpp index 07af901..9363b7c 100644 --- a/tools/designer/src/lib/shared/filterwidget.cpp +++ b/tools/designer/src/lib/shared/filterwidget.cpp @@ -209,10 +209,9 @@ QString FilterWidget::text() const void FilterWidget::checkButton(const QString &text) { - static QString oldtext; - if (oldtext.isEmpty() || text.isEmpty()) + if (m_oldText.isEmpty() || text.isEmpty()) m_button->animateShow(!m_editor->text().isEmpty()); - oldtext = text; + m_oldText = text; } void FilterWidget::reset() diff --git a/tools/designer/src/lib/shared/filterwidget_p.h b/tools/designer/src/lib/shared/filterwidget_p.h index 423b30e..8ca2073 100644 --- a/tools/designer/src/lib/shared/filterwidget_p.h +++ b/tools/designer/src/lib/shared/filterwidget_p.h @@ -142,6 +142,7 @@ private: HintLineEdit *m_editor; IconButton *m_button; int m_buttonwidth; + QString m_oldText; }; } // namespace qdesigner_internal |