summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf3
-rw-r--r--src/x11extras/qx11info_x11.cpp3
2 files changed, 5 insertions, 1 deletions
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;
}