Fixed an issue with animated icons on fancylineedit

Using a static local here is obviously simply wrong.
This should take care of the remaining issues with broken
animation states.

Reviewed-by: danimo
This commit is contained in:
Jens Bache-Wiig
2010-04-29 16:48:30 +02:00
parent f5f17b6353
commit b3284a1e71
2 changed files with 3 additions and 3 deletions

View File

@@ -126,10 +126,9 @@ FancyLineEdit::FancyLineEdit(QWidget *parent) :
void FancyLineEdit::checkButton(const QString &text)
{
if (autoHideIcon()) {
static QString oldtext;
if (oldtext.isEmpty() || text.isEmpty())
if (m_oldText.isEmpty() || text.isEmpty())
m_d->m_iconbutton->animateShow(!text.isEmpty());
oldtext = text;
m_oldText = text;
}
}

View File

@@ -114,6 +114,7 @@ private:
bool isSideStored() const;
FancyLineEditPrivate *m_d;
QString m_oldText;
};
} // namespace Utils