diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-26 14:38:54 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-04-27 15:29:34 +0000 |
commit | e81f52ecc7cdbc555865c25289a6946837a15126 (patch) | |
tree | 6ec5cd7b09cf7cf45ae8750ecf098f70e495ff73 /src/plugins | |
parent | a79c599df1df1ca296a86f495508b79a6eb356ee (diff) |
xcb: eradicate Q_FOREACH loops [const-& returns]
... by replacing them with C++11 range-for loops.
The function QObject::children() returns by const-reference,
so its result can be passed to range-for without further changes.
Saves ~300B in text size on optimized GCC 6.0 Linux AMD64 builds.
Change-Id: I8360e946774b0d30233c0fa68f318872da61e867
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index c507ac09b6..2c0f1f26b0 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -286,7 +286,7 @@ static inline XTextProperty* qstringToXTP(Display *dpy, const QString& s) // TODO move this into a utility function in QWindow or QGuiApplication static QWindow *childWindowAt(QWindow *win, const QPoint &p) { - foreach (QObject *obj, win->children()) { + for (QObject *obj : win->children()) { if (obj->isWindowType()) { QWindow *childWin = static_cast<QWindow *>(obj); if (childWin->isVisible()) { |