summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-01-26 14:38:54 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-02-11 23:18:44 +0000
commit10742cf8949497b83b87133ed66ec119cb3ab08f (patch)
tree7cd1f26379840d1768d86851725465cde06455c9 /src/gui/kernel/qguiapplication.cpp
parent37a933c2b14a4a1aad54af0eba0bc210ae5b549a (diff)
QtGui: eradicate Q_FOREACH loops [const-& returns]
... by replacing them with C++11 range-for loops. The function QObject::children() returns by const-reference, so they can be passed to range-for without further changes. Change-Id: I8cd2921165c45020914dd3a23b1f18b519fe7900 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 9b64c32533..e4d7ad8fcd 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -719,9 +719,10 @@ static void updateBlockedStatusRecursion(QWindow *window, bool shouldBeBlocked)
p->blockedByModalWindow = shouldBeBlocked;
QEvent e(shouldBeBlocked ? QEvent::WindowBlocked : QEvent::WindowUnblocked);
QGuiApplication::sendEvent(window, &e);
- foreach (QObject *c, window->children())
+ for (QObject *c : window->children()) {
if (c->isWindowType())
updateBlockedStatusRecursion(static_cast<QWindow *>(c), shouldBeBlocked);
+ }
}
}