diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-26 14:38:54 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-02-11 23:18:44 +0000 |
commit | 10742cf8949497b83b87133ed66ec119cb3ab08f (patch) | |
tree | 7cd1f26379840d1768d86851725465cde06455c9 /src/gui/kernel/qwindow.cpp | |
parent | 37a933c2b14a4a1aad54af0eba0bc210ae5b549a (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/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index c1bba59140..0c7e0e5816 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -365,7 +365,7 @@ void QWindowPrivate::emitScreenChangedRecursion(QScreen *newScreen) { Q_Q(QWindow); emit q->screenChanged(newScreen); - foreach (QObject *child, q->children()) { + for (QObject *child : q->children()) { if (child->isWindowType()) static_cast<QWindow *>(child)->d_func()->emitScreenChangedRecursion(newScreen); } |