summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf3
-rw-r--r--src/src.pro1
-rw-r--r--src/x11extras/qx11info_x11.cpp3
-rw-r--r--tests/tests.pro1
4 files changed, 7 insertions, 1 deletions
diff --git a/.qmake.conf b/.qmake.conf
index b1c22d3..d94a2e0 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.9.0
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/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;
}
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