Summary: | KLineEdit clear button isn't shown properly if text was set in constructor | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Danilo Luvizotto <danilo.luvizotto> |
Component: | kdeui | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andresbajotierra, frank78ac |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Danilo Luvizotto
2009-05-17 21:17:42 UTC
Here using: Qt: 4.5.1 (qt-copy 971295) KDE: 4.2.91 (KDE 4.2.91 (KDE 4.3 >= 20090609)) kdelibs svn rev. 982117 / kdebase svn rev. 982118 on ArchLinux i686 - Kernel 2.6.29.4 I can confirm this bug SVN commit 982488 by darioandres: -- When a KLineEdit is initialized with no text in the constructor, the KLineEditButton::animateVisible function is first called with false (animate to invisible), and the direction is set to Backward When a text is set by code or by typing, animateVisible is called with true and the button is properly shown. However, when text is set on constructor of KLineEdit, the first animateVisible call with false will not be done, but the one with true will do. And it will return without showing the clear button because: m_timeline->direction() == QTimeLine::Forward (as set by constructor) -- Initialize KLineEditButton::m_timeLine as Backward will fix this issue, avoiding the need of the animateVisible(false) call for this widget to work. However, the button should have a better state of "I'm visible" to avoid calling to "animate to invisible" at first time, when the button isn't even shown. BUG: 193045 M +1 -1 klineedit_p.h WebSVN link: http://websvn.kde.org/?view=rev&revision=982488 thank you very much Unfortunately, it looks like the bug is back: bug 268898. |