summaryrefslogtreecommitdiff
path: root/src/x11extras/qx11info_x11.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-23 13:13:27 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-23 13:13:27 +0200
commitb45429fd7eeaf598d78f76a670a892c7d0d02f11 (patch)
tree816c9404dd07db02cbe5b3b57b1b188d3ec52efd /src/x11extras/qx11info_x11.cpp
parent1eb9325292586c356b6beb6d9056dfc0c4c2e502 (diff)
parent0f91218091da69a81eb3e3336d1bdbe572a21908 (diff)
downloadqtx11extras-b45429fd7eeaf598d78f76a670a892c7d0d02f11.tar.gz
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: .qmake.conf Change-Id: I5e403aafd4ef57dbbe813f1b7e62b49b18f77881
Diffstat (limited to 'src/x11extras/qx11info_x11.cpp')
-rw-r--r--src/x11extras/qx11info_x11.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}