From 10742cf8949497b83b87133ed66ec119cb3ab08f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 26 Jan 2016 14:38:54 +0100 Subject: 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 Reviewed-by: Lars Knoll --- src/gui/kernel/qwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel/qwindow.cpp') 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(child)->d_func()->emitScreenChangedRecursion(newScreen); } -- cgit v1.2.3