summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/CMakeLists.txt1
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager.cpp4
2 files changed, 1 insertions, 4 deletions
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index e7bd11578c..8117ed9a31 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -71,7 +71,6 @@ qt_internal_add_module(Widgets
NO_PCH_SOURCES
compat/removed_api.cpp
kernel/qgesturemanager.cpp # undef QT_NO_FOREACH
- kernel/qwidgetrepaintmanager.cpp # undef QT_NO_FOREACH
GENERATE_CPP_EXPORTS
)
diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp
index ab3caafaa9..c63f745446 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager.cpp
+++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp
@@ -1,8 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
-
#include "qplatformdefs.h"
#include "qwidgetrepaintmanager_p.h"
@@ -50,7 +48,7 @@ public:
}
bool isLocked() const {
- foreach (bool v, m_locked) {
+ for (const auto &[_, v] : m_locked.asKeyValueRange()) {
if (v)
return true;
}