Review Request: Fix logic with clear-button animation in klineedit (notably at first try) and address bug 268898.

Hugo Pereira Da Costa hugo at oxygen-icons.org
Thu Jul 28 00:49:26 BST 2011



> On July 26, 2011, 10:46 p.m., Aleix Pol Gonzalez wrote:
> > kdeui/widgets/klineedit.cpp, line 358
> > <http://git.reviewboard.kde.org/r/102095/diff/1/?file=30032#file30032line358>
> >
> >     Wouldn't it be better to put it this way? Just saying...
> >     
> >     d->clearButton->animateVisible(d->wideEnoughForClear && text.length() > 0);
> 
> Nicolas Alvarez wrote:
>     I think the original is clearer, to be honest.
> 
> Hugo Pereira Da Costa wrote:
>     I agree with Nicolas.
>     I have nothing against putting boolean test inside the method call, *in principle*, but I believe it's convenient only if the boolean condition is "short enough" to write.

Other than that, anyone willing to go for a "ship it" ? 
It was reported on bug 268898 that the patch actually works, and that no regression has been found so far (which is also my own experience)


- Hugo


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102095/#review5129
-----------------------------------------------------------


On July 26, 2011, 9:54 p.m., Hugo Pereira Da Costa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102095/
> -----------------------------------------------------------
> 
> (Updated July 26, 2011, 9:54 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> Details:
> - fixes the somewhat incorrect logic in KLineEditButton::animateVisible
> - simplifies KLineEdit::updateClearButtonIcon consequently.
> 
> 
> This addresses bug 268898.
>     http://bugs.kde.org/show_bug.cgi?id=268898
> 
> 
> Diffs
> -----
> 
>   kdeui/widgets/klineedit.cpp 8f1c8a4 
>   kdeui/widgets/klineedit_p.h 95016bd 
> 
> Diff: http://git.reviewboard.kde.org/r/102095/diff
> 
> 
> Testing
> -------
> 
> tested with klineedittest found in kdelibs/kdeui/tests, this with and without the patch attached to comment #1 of bug 268898, used to actually trigger the mentionned bug. Also tested with other klineEdit implementation such as Dolphin's location bar.
> 
> 
> Thanks,
> 
> Hugo
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110727/325ac641/attachment.htm>


More information about the kde-core-devel mailing list