From 448211f022507c6e7787e47aca4b3f12e3f12d94 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 12 Sep 2016 13:56:18 +0200 Subject: Make sure we find the xcb feature from QtGui Required to be able to continue to compile this module with the modularized configure Change-Id: Idd5984576ba770cccd2312e91dbd2ff2bcc55fab Reviewed-by: Oswald Buddenhagen --- src/src.pro | 1 + tests/tests.pro | 1 + 2 files changed, 2 insertions(+) diff --git a/src/src.pro b/src/src.pro index 934df5f..b1a97ea 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,4 +1,5 @@ TEMPLATE = subdirs +QT_FOR_CONFIG += gui-private qtConfig(xcb) { SUBDIRS += x11extras } diff --git a/tests/tests.pro b/tests/tests.pro index 930dee2..d1a5e17 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -1,4 +1,5 @@ TEMPLATE = subdirs +QT_FOR_CONFIG += gui-private qtConfig(xcb) { SUBDIRS += auto -- cgit v1.2.1 From 0f91218091da69a81eb3e3336d1bdbe572a21908 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 4 Sep 2016 19:56:46 +0200 Subject: Eradicate last Q_FOREACH and mark the library as Q_FOREACH-free and warning_clean The only public header, qx11info_x11.h isn't actually recognized by headersclean as a public header, so warning_clean has no effect. But the header _is_ clean, and maybe headersclean in QtBase will be fixed at some point. Change-Id: I23ef8476bee111685d7261322b4f7af47498dc96 Reviewed-by: Gabriel Hege Reviewed-by: Friedemann Kleint --- .qmake.conf | 3 +++ src/x11extras/qx11info_x11.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index aefa1e7..d1e1c4c 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,6 @@ load(qt_build_config) +CONFIG += warning_clean +DEFINES += QT_NO_FOREACH + MODULE_VERSION = 5.8.0 diff --git a/src/x11extras/qx11info_x11.cpp b/src/x11extras/qx11info_x11.cpp index f40f876..31bc405 100644 --- a/src/x11extras/qx11info_x11.cpp +++ b/src/x11extras/qx11info_x11.cpp @@ -60,7 +60,8 @@ QT_BEGIN_NAMESPACE static QScreen *findScreenForVirtualDesktop(int virtualDesktopNumber) { - foreach (QScreen *screen, QGuiApplication::screens()) { + const auto screens = QGuiApplication::screens(); + for (QScreen *screen : screens) { if (QXcbScreenFunctions::virtualDesktopNumber(screen) == virtualDesktopNumber) return screen; } -- cgit v1.2.1