[Kde-hardware-devel] Review Request 121386: Port XRandrBacklight to XCB
Martin Gräßlin
mgraesslin at kde.org
Mon Dec 8 08:47:52 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121386/#review71535
-----------------------------------------------------------
daemon/backends/upower/xrandrbrightness.cpp
<https://git.reviewboard.kde.org/r/121386/#comment49892>
why is it calling twice xcb_intern_atom and only once xcb_intern_atom_reply? That's leaking an xcb_intern_atom_reply_t.
daemon/backends/upower/xrandrbrightness.cpp
<https://git.reviewboard.kde.org/r/121386/#comment49893>
why do yoy pass the error? Does it matter which errorCode is returned? It's very unlikely to ever fail and could be simplified to:
auto reply = xcb_intern_atom_reply(c, cookie, nullptr);
if (!reply) {
qCWarning(...)
return;
}
daemon/backends/upower/xrandrbrightness.cpp
<https://git.reviewboard.kde.org/r/121386/#comment49891>
coding style
daemon/backends/upower/xrandrbrightness.cpp
<https://git.reviewboard.kde.org/r/121386/#comment49890>
coding style
daemon/backends/upower/xrandrbrightness.cpp
<https://git.reviewboard.kde.org/r/121386/#comment49889>
coding style
daemon/backends/upower/xrandrbrightness.cpp
<https://git.reviewboard.kde.org/r/121386/#comment49888>
coding style
daemon/backends/upower/xrandrbrightness.cpp
<https://git.reviewboard.kde.org/r/121386/#comment49887>
xcb_aux_sync is not working as it's in a helper library.
You can find a sync implementation in KWin's xcbutils.h
- Martin Gräßlin
On Dec. 7, 2014, 10:36 p.m., Kai Uwe Broulik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121386/
> -----------------------------------------------------------
>
> (Updated Dec. 7, 2014, 10:36 p.m.)
>
>
> Review request for Solid and Martin Gräßlin.
>
>
> Repository: powerdevil
>
>
> Description
> -------
>
> This ports the XRandrBacklight class to XCB.
>
> The code is adapted from xbacklight, drops the legacy backlight stuff, whatever that is.
>
> It still uses XSync since xcb_aux_sync yields a linker error here (what did I overlook?). Pretty ugly C stuff (fre...), suggestions on how to improve the code look (nullptr, C++ style casts, etc) welcome.
>
>
> Diffs
> -----
>
> daemon/backends/upower/xrandrbrightness.h 873b1f5
> daemon/backends/upower/xrandrbrightness.cpp 8e5617d
>
> Diff: https://git.reviewboard.kde.org/r/121386/diff/
>
>
> Testing
> -------
>
> My hopes were that it would give us a more precise backlight handling but I get a range of 0..10 nonetheless. Other than that seems to work exactly like it did before.
>
>
> Thanks,
>
> Kai Uwe Broulik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20141208/4221b7d3/attachment-0001.html>
More information about the Kde-hardware-devel
mailing list