summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src.pro1
-rw-r--r--src/x11extras/qx11info_x11.cpp3
2 files changed, 3 insertions, 1 deletions
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;
}