Review Request 130123: Fix the skip disabled backlight device

AceLan Kao acelan at acelan.idv.tw
Wed May 10 01:58:44 UTC 2017


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130123/
-----------------------------------------------------------

(Updated May 10, 2017, 1:58 a.m.)


Review request for Solid.


Changes
-------

Changes V2:
       1. Declare isRawBacklightEnabled() as a static function
       2. Using QFile constructor to pass the file path
       3. Declare "QByteArray buffer" when it's really needed below
       4. Remove "bool result", and just return true/false directly
       5. Adding curly brackets to if statement


Repository: powerdevil


Description
-------

Only raw backlight interface have the "enabled" file under "device"
directory.
So the commit
   5c0d35c skip the disabled backlight device
affects all types of backlight interfaces is wrong, it will drop out all
other type of backlight interfaces except raw tyep backlight.

To fix this, we just need to check the enabled file for raw backlight
interfaces only.

Signed-off-by: AceLan Kao <acelan at acelan.idv.tw>


Diffs (updated)
-----

  daemon/backends/upower/backlighthelper.h 1382dd09938840371dbf34312fe2e8093abfbe10 
  daemon/backends/upower/backlighthelper.cpp e0eb6c461a7aac50533e833953977d46a7c8e4f3 

Diff: https://git.reviewboard.kde.org/r/130123/diff/


Testing
-------


Thanks,

AceLan Kao

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20170510/789953ce/attachment-0001.html>


More information about the Kde-hardware-devel mailing list