summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qplatformscreen.cpp')
-rw-r--r--src/gui/kernel/qplatformscreen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp
index 34a07969755..8450c6a0834 100644
--- a/src/gui/kernel/qplatformscreen.cpp
+++ b/src/gui/kernel/qplatformscreen.cpp
@@ -111,7 +111,8 @@ QWindow *QPlatformScreen::topLevelAt(const QPoint & pos) const
const QPlatformScreen *QPlatformScreen::screenForPosition(const QPoint &point) const
{
if (!geometry().contains(point)) {
- Q_FOREACH (const QPlatformScreen* screen, virtualSiblings()) {
+ const auto screens = virtualSiblings();
+ for (const QPlatformScreen *screen : screens) {
if (screen->geometry().contains(point))
return screen;
}