Review Request 127536: KNewPasswordWidget: fix QPalette when the widget is disabled
David Faure
faure at kde.org
Sun Apr 10 09:37:14 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127536/#review94475
-----------------------------------------------------------
Fix it, then Ship it!
autotests/knewpasswordwidgettest.cpp (line 247)
<https://git.reviewboard.kde.org/r/127536/#comment64252>
The function names are confusing: testDisableWidget and testWidgetDisabled? ;-)
I guess this one could be testParentWidgetDisabled, right?
But since we're talking about test function naming, better practice is to use "should", like:
disablingPasswordWidgetShouldUseDisabledPalette
and
disablingParentShouldUseDisabledPalette
(or whatever it is these functions are testing ;)
autotests/knewpasswordwidgettest.cpp (line 260)
<https://git.reviewboard.kde.org/r/127536/#comment64253>
So if both lineedits use the wrong palette, the test passes :-)
I think comparing with widget->palette() would work.
About your previous reply to Aleix: indeed, if the test fails without the fix, then the test is good :-)
- David Faure
On April 4, 2016, 2:33 p.m., Elvis Angelaccio wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127536/
> -----------------------------------------------------------
>
> (Updated April 4, 2016, 2:33 p.m.)
>
>
> Review request for KDE Frameworks, Aleix Pol Gonzalez, Christoph Feck, and David Faure.
>
>
> Repository: kwidgetsaddons
>
>
> Description
> -------
>
> If the widget gets disabled, the verification's QLineEdit is disabled as well, but its QPalette is wrong (see the screenshots).
> This patch fixes the bug by setting the Active color group for the palette.
>
>
> Diffs
> -----
>
> autotests/knewpasswordwidgettest.h 3b7418700557cd3a2b3de91127f76a5bf99345d3
> autotests/knewpasswordwidgettest.cpp 4507dbdc899407afb72ffa14437f050aae0b57df
> src/knewpasswordwidget.cpp 72748d6b9e9fed979bd75ce856867a7bbf9e2fbd
>
> Diff: https://git.reviewboard.kde.org/r/127536/diff/
>
>
> Testing
> -------
>
> A test case is added to reproduce the bug.
>
>
> File Attachments
> ----------------
>
> Before
> https://git.reviewboard.kde.org/media/uploaded/files/2016/03/31/d4d0d5be-91d4-4787-adc2-032d358a3dc5__knewpasswordwidget-disabled1.png
> After
> https://git.reviewboard.kde.org/media/uploaded/files/2016/03/31/46e24106-ceb5-486f-8222-d928c8690929__knewpasswordwidget-disabled2.png
>
>
> Thanks,
>
> Elvis Angelaccio
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160410/414ae540/attachment.html>
More information about the Kde-frameworks-devel
mailing list