summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2018-07-14 06:17:46 (GMT)
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2018-07-30 10:58:15 (GMT)
commitef6aeb61e4c663b8287fc80909cea959fda8ccf0 (patch)
tree1696e82ac032bb4b00aabff934abbd6cf8730bf0
parent754b2b21b0ce0e435ddc3c8ddce3bd6e12915f96 (diff)
downloadqtx11extras-ef6aeb61e4c663b8287fc80909cea959fda8ccf0.tar.gz
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 <david.faure@kdab.com>
-rw-r--r--src/x11extras/qx11info_x11.cpp5
-rw-r--r--src/x11extras/qx11info_x11.h4
2 files changed, 9 insertions, 0 deletions
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();