Bug 129040 - [glib] Update the battery provider to UPower 1.0
Summary: [glib] Update the battery provider to UPower 1.0
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-19 05:36 PST by Giovanni Campagna
Modified: 2016-10-31 11:04 PDT (History)
6 users (show)

See Also:


Attachments
Patch (6.37 KB, patch)
2014-02-19 05:37 PST, Giovanni Campagna
mrobinson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Campagna 2014-02-19 05:36:54 PST
[glib] Update the battery provider to UPower 1.0
Comment 1 Giovanni Campagna 2014-02-19 05:37:24 PST
Created attachment 224627 [details]
Patch
Comment 2 WebKit Commit Bot 2014-02-19 05:39:12 PST
Attachment 224627 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:30:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:36:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:36:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:37:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:37:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:37:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:38:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:38:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:38:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:39:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:39:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:39:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:40:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:40:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:58:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:84:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:85:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:86:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:87:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:88:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:89:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:90:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:97:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:98:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:100:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
ERROR: Source/WebCore/platform/glib/BatteryProviderUPower.cpp:102:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
Total errors found: 26 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Philippe Normand 2014-03-16 03:48:44 PDT
This also needs a ChangeLog :)

Also, we're moving from automake to cmake for the build. It seems that our current cmake setup doesn't check the presence of upower-glib, would you mind providing a patch for this? I suppose a new WebCore/cmake/FindUPower.cmake module would be required.
Comment 4 Michael Catanzaro 2015-06-20 07:57:30 PDT
So I was wondering why our battery provider was not horribly broken, considering that upower 1.0 removed all the D-Bus API it relies on before the original battery support was even committed. Turns out these files are not built at all (they were added only to the autotools build). So it's all dead code. Unofficial r- from me; we need to get this building again.

Note: the battery provider cannot possibly ever work without this patch.
Comment 5 Michael Catanzaro 2015-06-20 08:00:00 PDT
Also, the comments of the style checker are not optional; WebKit coding style is different from what's normal in GNOME.
Comment 6 Giovanni Campagna 2015-07-03 16:02:26 PDT
Well, given that this code is not actually used, and given that I don't have a lot of free time these days, I don't think I will work on improving it.
Hope you find it useful for a subsequent properly cleaned up patch, otherwise just close the bug and sorry for the noise.
Comment 7 Michael Catanzaro 2015-07-03 16:30:21 PDT
No, of course it's useful, thanks for submitting it. :)
Comment 8 Martin Robinson 2016-03-09 12:26:11 PST
Comment on attachment 224627 [details]
Patch

r- given previous comments. No objections specifically from me, but this shouldn't be in the review queue.
Comment 9 Michael Catanzaro 2016-03-09 14:08:36 PST
We should either delete this code, or figure out what the battery provider is for, clean up this patch, and get it hooked up somehow. Any preferences?
Comment 10 Michael Catanzaro 2016-10-31 11:04:25 PDT
The API this code is intended to support is being removed, see bug #164213