Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Thomas Lübking


> 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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?
> 
> Martin Gräßlin wrote:
> > 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
> 
> Kevin Ottens wrote:
> I stand by my "ship it!" then.
> 
> Marco Martin wrote:
> @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
> 
> Thomas Lübking wrote:
> 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::NumberOfDesktops | NET::DesktopNames), 
> NET::WM2DesktopLayout);
> 
> should get you the correct result (but scratching the duplicated code is 
> oc. fine anyway =)
> 
> Marco Martin wrote:
> 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
> 
> Thomas Lübking wrote:
> It's actually seems a bug in Q_DECLARE_FLAGS / QFlags, for this does 
> *not* happen w/
> 
> ---
> 
> #include 
> 
> enum Foo { Foo1, Foo2 };
> enum Bar { Bar1, Bar2 };
> 
> void fooBar(Foo foo, Bar bar, int i = 5)
> {
> printf("foo bar int\n");
> }
> 
> void fooBar(Foo foo, int i = 5)
> {
> printf("foo int\n");
> }
> 
> int main(int, char **)
> {
> fooBar(Foo1, Bar1);
> fooBar(Foo1, Bar1|Bar2);
> }
> 
> ---
> 
> which prints (as can be expected)
> 
>  foo bar int
>  foo int
> 
> 
> but it *does* happen w/
> 
> -
> 
> #include 
> #include 
> 
> enum Foo { Foo1, Foo2 };
> enum Bar { Bar1, Bar2 };
> 
> Q_DECLARE_FLAGS(Foos, Foo)
> Q_DECLARE_OPERATORS_FOR_FLAGS(Foos)
> Q_DECLARE_FLAGS(Bars, Bar)
> Q_DECLARE_OPERATORS_FOR_FLAGS(Bars)
> 
> void fooBar(Foos foo, Bars bar, int i = 5)
> {
> printf("foo bar int\n");
> }
> 
> void fooBar(Foos foo, int i = 5)
> {
> printf("foo int\n");
> }
> 
> int main(int, char **)
> {
> fooBar(Foo1, Bar1);
> fooBar(Foo1, Bar1|Bar2);
> }
> 
> 
> 
> which prints
> 
>  foo int
>  foo bar int
> 
> 
> IOW, QFlags maintains type safety for operated enums/flags, but *not* for 
> singleton ones.
> 
> Thomas Lübking wrote:
> https://bugreports.qt-project.org/browse/QTBUG-38810
> 
> Marco Martin wrote:
> So it seems is a known problem and there is nothing that can be done.
> for now is pushed, if there are problems with it, can be changed/reverted 
> for an handful of days still

- i'm fine w/ the patch anyway (Qt fix or not, it was broken, so SIC doesn't 
matter - plus it removes a bunch of LOC)
- "nothing can be done" does not exist in my language ;-)
- could frameworks already use c++11 strongly typed enums?


- Thomas


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


On May 6, 2014, 8:08 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, 8:08 p.m.)
> 

Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Marco Martin


> 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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?
> 
> Martin Gräßlin wrote:
> > 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
> 
> Kevin Ottens wrote:
> I stand by my "ship it!" then.
> 
> Marco Martin wrote:
> @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
> 
> Thomas Lübking wrote:
> 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::NumberOfDesktops | NET::DesktopNames), 
> NET::WM2DesktopLayout);
> 
> should get you the correct result (but scratching the duplicated code is 
> oc. fine anyway =)
> 
> Marco Martin wrote:
> 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
> 
> Thomas Lübking wrote:
> It's actually seems a bug in Q_DECLARE_FLAGS / QFlags, for this does 
> *not* happen w/
> 
> ---
> 
> #include 
> 
> enum Foo { Foo1, Foo2 };
> enum Bar { Bar1, Bar2 };
> 
> void fooBar(Foo foo, Bar bar, int i = 5)
> {
> printf("foo bar int\n");
> }
> 
> void fooBar(Foo foo, int i = 5)
> {
> printf("foo int\n");
> }
> 
> int main(int, char **)
> {
> fooBar(Foo1, Bar1);
> fooBar(Foo1, Bar1|Bar2);
> }
> 
> ---
> 
> which prints (as can be expected)
> 
>  foo bar int
>  foo int
> 
> 
> but it *does* happen w/
> 
> -
> 
> #include 
> #include 
> 
> enum Foo { Foo1, Foo2 };
> enum Bar { Bar1, Bar2 };
> 
> Q_DECLARE_FLAGS(Foos, Foo)
> Q_DECLARE_OPERATORS_FOR_FLAGS(Foos)
> Q_DECLARE_FLAGS(Bars, Bar)
> Q_DECLARE_OPERATORS_FOR_FLAGS(Bars)
> 
> void fooBar(Foos foo, Bars bar, int i = 5)
> {
> printf("foo bar int\n");
> }
> 
> void fooBar(Foos foo, int i = 5)
> {
> printf("foo int\n");
> }
> 
> int main(int, char **)
> {
> fooBar(Foo1, Bar1);
> fooBar(Foo1, Bar1|Bar2);
> }
> 
> 
> 
> which prints
> 
>  foo int
>  foo bar int
> 
> 
> IOW, QFlags maintains type safety for operated enums/flags, but *not* for 
> singleton ones.
> 
> Thomas Lübking wrote:
> https://bugreports.qt-project.org/browse/QTBUG-38810

So it seems is a known problem and there is nothing that can be done.
for now is pushed, if there are problems with it, can be changed/reverted for 
an handful of days still


- Marco


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


On May 6, 2014, 8:08 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, 8:08 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 = 

Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Marco Martin

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

(Updated May 6, 2014, 8:08 p.m.)


Status
--

This change has been marked as submitted.


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

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Commit Hook

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


This review has been submitted with commit 
a6672a99a2183a3eadcb42efab57e94485d8e16c by Marco Martin to branch master.

- Commit Hook


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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Thomas Lübking


> 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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?
> 
> Martin Gräßlin wrote:
> > 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
> 
> Kevin Ottens wrote:
> I stand by my "ship it!" then.
> 
> Marco Martin wrote:
> @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
> 
> Thomas Lübking wrote:
> 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::NumberOfDesktops | NET::DesktopNames), 
> NET::WM2DesktopLayout);
> 
> should get you the correct result (but scratching the duplicated code is 
> oc. fine anyway =)
> 
> Marco Martin wrote:
> 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
> 
> Thomas Lübking wrote:
> It's actually seems a bug in Q_DECLARE_FLAGS / QFlags, for this does 
> *not* happen w/
> 
> ---
> 
> #include 
> 
> enum Foo { Foo1, Foo2 };
> enum Bar { Bar1, Bar2 };
> 
> void fooBar(Foo foo, Bar bar, int i = 5)
> {
> printf("foo bar int\n");
> }
> 
> void fooBar(Foo foo, int i = 5)
> {
> printf("foo int\n");
> }
> 
> int main(int, char **)
> {
> fooBar(Foo1, Bar1);
> fooBar(Foo1, Bar1|Bar2);
> }
> 
> ---
> 
> which prints (as can be expected)
> 
>  foo bar int
>  foo int
> 
> 
> but it *does* happen w/
> 
> -
> 
> #include 
> #include 
> 
> enum Foo { Foo1, Foo2 };
> enum Bar { Bar1, Bar2 };
> 
> Q_DECLARE_FLAGS(Foos, Foo)
> Q_DECLARE_OPERATORS_FOR_FLAGS(Foos)
> Q_DECLARE_FLAGS(Bars, Bar)
> Q_DECLARE_OPERATORS_FOR_FLAGS(Bars)
> 
> void fooBar(Foos foo, Bars bar, int i = 5)
> {
> printf("foo bar int\n");
> }
> 
> void fooBar(Foos foo, int i = 5)
> {
> printf("foo int\n");
> }
> 
> int main(int, char **)
> {
> fooBar(Foo1, Bar1);
> fooBar(Foo1, Bar1|Bar2);
> }
> 
> 
> 
> which prints
> 
>  foo int
>  foo bar int
> 
> 
> IOW, QFlags maintains type safety for operated enums/flags, but *not* for 
> singleton ones.

https://bugreports.qt-project.org/browse/QTBUG-38810


- 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, 

Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Thomas Lübking


> 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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?
> 
> Martin Gräßlin wrote:
> > 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
> 
> Kevin Ottens wrote:
> I stand by my "ship it!" then.
> 
> Marco Martin wrote:
> @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
> 
> Thomas Lübking wrote:
> 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::NumberOfDesktops | NET::DesktopNames), 
> NET::WM2DesktopLayout);
> 
> should get you the correct result (but scratching the duplicated code is 
> oc. fine anyway =)
> 
> Marco Martin wrote:
> 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

It's actually seems a bug in Q_DECLARE_FLAGS / QFlags, for this does *not* 
happen w/

---

#include 

enum Foo { Foo1, Foo2 };
enum Bar { Bar1, Bar2 };

void fooBar(Foo foo, Bar bar, int i = 5)
{
printf("foo bar int\n");
}

void fooBar(Foo foo, int i = 5)
{
printf("foo int\n");
}

int main(int, char **)
{
fooBar(Foo1, Bar1);
fooBar(Foo1, Bar1|Bar2);
}

---

which prints (as can be expected)

 foo bar int
 foo int


but it *does* happen w/

-

#include 
#include 

enum Foo { Foo1, Foo2 };
enum Bar { Bar1, Bar2 };

Q_DECLARE_FLAGS(Foos, Foo)
Q_DECLARE_OPERATORS_FOR_FLAGS(Foos)
Q_DECLARE_FLAGS(Bars, Bar)
Q_DECLARE_OPERATORS_FOR_FLAGS(Bars)

void fooBar(Foos foo, Bars bar, int i = 5)
{
printf("foo bar int\n");
}

void fooBar(Foos foo, int i = 5)
{
printf("foo int\n");
}

int main(int, char **)
{
fooBar(Foo1, Bar1);
fooBar(Foo1, Bar1|Bar2);
}



which prints

 foo int
 foo bar int


IOW, QFlags maintains type safety for operated enums/flags, but *not* for 
singleton ones.


- 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
> 
>

__

Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Marco Martin


> 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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?
> 
> Martin Gräßlin wrote:
> > 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
> 
> Kevin Ottens wrote:
> I stand by my "ship it!" then.
> 
> Marco Martin wrote:
> @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
> 
> Thomas Lübking wrote:
> 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::NumberOfDesktops | NET::DesktopNames), 
> NET::WM2DesktopLayout);
> 
> should get you the correct result (but scratching the duplicated code is 
> oc. fine anyway =)

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


- Marco


---
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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Thomas Lübking


> 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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?
> 
> Martin Gräßlin wrote:
> > 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
> 
> Kevin Ottens wrote:
> I stand by my "ship it!" then.
> 
> Marco Martin wrote:
> @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

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::NumberOfDesktops | NET::DesktopNames), 
NET::WM2DesktopLayout);

should get you the correct result (but scratching the duplicated code is oc. 
fine anyway =)


- 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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Marco Martin


> 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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?
> 
> Martin Gräßlin wrote:
> > 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
> 
> Kevin Ottens wrote:
> I stand by my "ship it!" then.

@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


- Marco


---
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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Kevin Ottens


> 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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?
> 
> Martin Gräßlin wrote:
> > 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

I stand by my "ship it!" then.


- Kevin


---
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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Martin Gräßlin


> On May 6, 2014, 3: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.
> 
> Thomas Lübking wrote:
> 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...
> 
> Kevin Ottens wrote:
> Ah I see. Hm, is it very much used outside of the workspace?

> 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


- Martin


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


On May 6, 2014, 2: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, 2: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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Kevin Ottens


> 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.
> 
> Thomas Lübking wrote:
> 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...

Ah I see. Hm, is it very much used outside of the workspace?


- Kevin


---
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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Thomas Lübking


> 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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Martin Gräßlin


> On May 6, 2014, 3:30 p.m., Kevin Ottens wrote:
> > AFAICT it is BIC but no SIC, no brainer.

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.


- Martin


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


On May 6, 2014, 2: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, 2: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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Kevin Ottens

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

Ship it!


AFAICT it is BIC but no SIC, no brainer.

- Kevin Ottens


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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Martin Gräßlin

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


Looks good to me and I want to see it merged, but also an ACK from frameworks 
masters as it's a SIC change.

- Martin Gräßlin


On May 6, 2014, 2: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, 2: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
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Review Request 118016: Fix wrong constructor resolution

2014-05-06 Thread Marco Martin

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

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

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel