From ef6aeb61e4c663b8287fc80909cea959fda8ccf0 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Sat, 14 Jul 2018 08:17:46 +0200 Subject: Fix return type of appRootWindow for Qt 6 This is minor, but it's a bit silly to cast down to a 32 bit type in return and then cast it up to 64 bit again on the same line. The returned value is most likely used to other x11 calls which expect 32 bit. I think this is so minor that it doesn't even need a change log entry for Qt 6. Change-Id: I3b54394c7934eb62026dfcf241e983c20b7e7d9c Reviewed-by: David Faure --- src/x11extras/qx11info_x11.cpp | 5 +++++ src/x11extras/qx11info_x11.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/x11extras/qx11info_x11.cpp b/src/x11extras/qx11info_x11.cpp index 77caca7..394a629 100644 --- a/src/x11extras/qx11info_x11.cpp +++ b/src/x11extras/qx11info_x11.cpp @@ -164,7 +164,12 @@ int QX11Info::appDpiY(int screen) \sa QApplication::desktop() */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +// ### Qt 6: remove unsigned long QX11Info::appRootWindow(int screen) +#else +quint32 QX11Info::appRootWindow(int screen) +#endif { if (!qApp) return 0; diff --git a/src/x11extras/qx11info_x11.h b/src/x11extras/qx11info_x11.h index c0bfbf8..20f048a 100644 --- a/src/x11extras/qx11info_x11.h +++ b/src/x11extras/qx11info_x11.h @@ -63,7 +63,11 @@ public: static int appDpiX(int screen=-1); static int appDpiY(int screen=-1); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) static unsigned long appRootWindow(int screen=-1); +#else + static quint32 appRootWindow(int screen=-1); +#endif static int appScreen(); static unsigned long appTime(); -- cgit v1.2.1