Fix brightness and animation

Review Request #125156 - Created Sept. 11, 2015 and submitted

Information
Xuetian Weng
powerdevil
Plasma/5.4, master
346456, 350676
Reviewers
solid
broulik

As described in https://bugs.kde.org/show_bug.cgi?id=350676#c5

There are two issue here:
1. m_cacheBrightness may not be updated after animation.
2. setStartValue and setEndValue may emit unwanted valueChanged even when animation is stopped. Though I don't agree that the bug is in Qt (see my https://bugs.kde.org/show_bug.cgi?id=350676#c7). But we need to skip this emit anyway.

1 is resolved by always query the brightness when animation emit finished(). slotScreenBrightnessChanged is reused for this purpose.
2 is resolved by disconnect and reconnect the signal to skip setStartValue and setEndValue.

not be able to reproduce 350676.

Martin Flöser
Kai Uwe Broulik
Xuetian Weng
Xuetian Weng
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 1005dd9a25c5fafea1f781c6d2a49fe99e219a34 by Weng Xuetian to branch Plasma/5.4.
Loading...