Summary: | KLineEdit: Clear button is invisible if the text is set before setClearButton(true) is called (regression since 4.5) | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Frank Reininghaus <frank78ac> |
Component: | kdeui | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anthony.renoux, cfeck, fischer, frank78ac, hugo.pereira.da.costa, hugo |
Priority: | NOR | Keywords: | investigated |
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Patch for klineedittest that makes the bug visible
possible patch updated patch |
Description
Frank Reininghaus
2011-03-19 14:11:39 UTC
CC'ing Hugo (who committed the patch that looks like it's caused the regression). I've just seen in the logs that this bug had been there even earlier and was fixed already: bug 193045. It would be nice if we could unit-test it ;-) Hugo, any comment? Will have a look ASAP. Thanks for cc-ing me. Created attachment 62182 [details]
possible patch
ok. So attached is a patch, that apparently works (feel free to double check and report back).
Now, digging into the code, it seems to me that the logic could be simplified/clarified (notably there are a number of redundant calls to button->show() and button->hide() at initialization), and I might come with more substancial changes to review board.
Will have some fix pushed for kde 4.7.1
(I dont think this is a serious enough issue to push a fix in 4.7.0)
Created attachment 62222 [details] updated patch updated version of the patch. I like this one better than the first because - it actually fixes the logic (which was flawed IMHO) in KLineEditButton::animateVisible - it consequently simplifies the logic in KLineEdit::updateClearButtonIcon And the "klineedittest" unit-test works with and without the patch posted in comment #1. Comments are welcome, but I'll file a ReviewBoard request anyway. Hugo, thanks for the patch. It fixes the issue for me, and I haven't seen any regressions so far. @Christoph: Thanks for CC-ing Hugo properly, it seems that I got the e-mail address wrong. ok. Pushed. (see http://git.reviewboard.kde.org/r/102095/) So closing. (I'll backport to 4.7.1 too) *** Bug 294954 has been marked as a duplicate of this bug. *** |