Review Request 118016: Fix wrong constructor resolution
Thomas Lübking
thomas.luebking at gmail.com
Tue May 6 13:37:09 UTC 2014
> On May 6, 2014, 1:30 p.m., Kevin Ottens wrote:
> > AFAICT it is BIC but no SIC, no brainer.
>
> Martin Gräßlin wrote:
> it's a SIC change as one could have used the variant specifying just NET::Properties and screen. This would now have to be changed to use NET::Properties2 before screen argument.
It's SIC.
"NETRootInfo(connection, properties, 1);" would now cause an error, but since it's been buggy anyway (enums are indeed not polymorphic, but for int,... though gcc could have known better) that should hardly matter.
@Marco
got that with gcc or clang? And which version and what specific call?
The constructor is (theoretically) correctly resolvable and if it's an ambiguous call, i'd expect a compiler error as well...
- Thomas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118016/#review57407
-----------------------------------------------------------
On May 6, 2014, 12:47 p.m., Marco Martin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118016/
> -----------------------------------------------------------
>
> (Updated May 6, 2014, 12:47 p.m.)
>
>
> Review request for KDE Frameworks and kwin.
>
>
> Repository: kwindowsystem
>
>
> Description
> -------
>
> when the constructor
> NETRootInfo(xcb_connection_t *connection, NET::Properties properties, NET::Properties2 properties2,
> int screen = -1, bool doActivate = true);
>
> gets called, NET::Properties2 gets casted as int and the other constructor
>
> NETRootInfo(xcb_connection_t *connection, NET::Properties properties, int screen = -1, bool doActivate = true)
>
> is called instead.
>
> This patch merges the two constructors, fixing all the users of the first one
>
>
> Diffs
> -----
>
> autotests/netrootinfotestwm.cpp da7dcea
> src/netwm.h 7cbf2ab
> src/netwm.cpp a0e9105
>
> Diff: https://git.reviewboard.kde.org/r/118016/diff/
>
>
> Testing
> -------
>
> screen and doActivate parameter weren't used by any, so all the currently ported software still builds and works correctly
>
>
> Thanks,
>
> Marco Martin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140506/8d4803a6/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list