aboutsummaryrefslogtreecommitdiffstats
path: root/src/winextras/qwineventfilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/winextras/qwineventfilter.cpp')
-rw-r--r--src/winextras/qwineventfilter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/winextras/qwineventfilter.cpp b/src/winextras/qwineventfilter.cpp
index 3f6f013..6b31e71 100644
--- a/src/winextras/qwineventfilter.cpp
+++ b/src/winextras/qwineventfilter.cpp
@@ -113,7 +113,8 @@ void QWinEventFilter::setup()
QWindow *QWinEventFilter::findWindow(HWND handle)
{
const WId wid = reinterpret_cast<WId>(handle);
- foreach (QWindow *topLevel, QGuiApplication::topLevelWindows()) {
+ const auto topLevels = QGuiApplication::topLevelWindows();
+ for (QWindow *topLevel : topLevels) {
if (topLevel->handle() && topLevel->winId() == wid)
return topLevel;
}