From d08db1100874fdc36ea169d34a8902133186b84b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 6 Aug 2016 17:26:37 +0300 Subject: Remove last uses of Java-style (non-mutable) iterators from QtBase Change-Id: I7531ffd4f2d5b2193bb6231c743ff0a074618b99 Reviewed-by: Lars Knoll --- src/widgets/util/qsystemtrayicon.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index 7b0ecc6972..6e2601880b 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -731,9 +731,8 @@ void QSystemTrayIconPrivate::addPlatformMenu(QMenu *menu) const // The recursion depth is the same as menu depth, so should not // be higher than 3 levels. - QListIterator it(menu->actions()); - while (it.hasNext()) { - QAction *action = it.next(); + const auto actions = menu->actions(); + for (QAction *action : actions) { if (action->menu()) addPlatformMenu(action->menu()); } -- cgit v1.2.3