<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/118016/">https://git.reviewboard.kde.org/r/118016/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On May 6th, 2014, 1:30 p.m. UTC, <b>Kevin Ottens</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">AFAICT it is BIC but no SIC, no brainer.</pre>
</blockquote>
<p>On May 6th, 2014, 1:36 p.m. UTC, <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
<p>On May 6th, 2014, 1:37 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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...</pre>
</blockquote>
<p>On May 6th, 2014, 1:44 p.m. UTC, <b>Kevin Ottens</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ah I see. Hm, is it very much used outside of the workspace?</pre>
</blockquote>
<p>On May 6th, 2014, 1:54 p.m. UTC, <b>Martin Gräßlin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">> is it very much used outside of the workspace?
probably not and ftr the ctors are SIC anyway compared to 4.x as it's now based on xcb</pre>
</blockquote>
<p>On May 6th, 2014, 1:56 p.m. UTC, <b>Kevin Ottens</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I stand by my "ship it!" then.</pre>
</blockquote>
<p>On May 6th, 2014, 2:08 p.m. UTC, <b>Marco Martin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">@Thomas: gcc 4.7.2 on opensuse
the error happens for instance in the virtual desktop KCM
NETRootInfo info(QX11Info::connection(), NET::NumberOfDesktops | NET::DesktopNames, NET::WM2DesktopLayout);
NET::WM2DesktopLayout gets passed as screen</pre>
</blockquote>
<p>On May 6th, 2014, 2:19 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ahh...
"You're holding it wrongly"™ ;-)
typeof(NET::NumberOfDesktops | NET::DesktopNames) == typeof(int)
NET::Property has no Q_DECLARE_OPERATORS_FOR_FLAGS (at least i don't see them) and thus "|" is the integer operator and the result is - integer.
calling
NETRootInfo info(QX11Info::connection(), static_cast<NET::Property>(NET::NumberOfDesktops | NET::DesktopNames), NET::WM2DesktopLayout);
should get you the correct result (but scratching the duplicated code is oc. fine anyway =)</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">yes, it does have Q_DECLARE_OPERATORS_FOR_FLAGS in the end of netwm_def.h
both Properties and Properties2
anyways, the problem is the last parameter, NET::WM2DesktopLayout that even if not or-ed, it gets casted as int anyways</pre>
<br />
<p>- Marco</p>
<br />
<p>On May 6th, 2014, 12:47 p.m. UTC, Marco Martin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDE Frameworks and kwin.</div>
<div>By Marco Martin.</div>
<p style="color: grey;"><i>Updated May 6, 2014, 12:47 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kwindowsystem
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">screen and doActivate parameter weren't used by any, so all the currently ported software still builds and works correctly</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>autotests/netrootinfotestwm.cpp <span style="color: grey">(da7dcea)</span></li>
<li>src/netwm.h <span style="color: grey">(7cbf2ab)</span></li>
<li>src/netwm.cpp <span style="color: grey">(a0e9105)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118016/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>