[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim] libkdepim/progresswidget: Iterate the hash directly saving the temporary QList construction
From: Sergio Martins <iamsergio () gmail ! com>
Date: 2015-07-31 18:26:15
Message-ID: E1ZLF0Z-0007Cv-J1 () scm ! kde ! org
[Download RAW message or body]
Git commit 0850a830470ccd470d0dcb66a70e7f4c405f1935 by Sergio Martins.
Committed on 31/07/2015 at 18:25.
Pushed by smartins into branch 'master'.
Iterate the hash directly saving the temporary QList construction
M +2 -5 libkdepim/progresswidget/progressmanager.cpp
http://commits.kde.org/kdepim/0850a830470ccd470d0dcb66a70e7f4c405f1935
diff --git a/libkdepim/progresswidget/progressmanager.cpp b/libkdepim/progresswidget/progressmanager.cpp
index ddf92ae..447bf9b 100644
--- a/libkdepim/progresswidget/progressmanager.cpp
+++ b/libkdepim/progresswidget/progressmanager.cpp
@@ -124,11 +124,8 @@ void ProgressItem::cancel()
qCDebug(LIBKDEPIM_LOG) << label();
mCanceled = true;
// Cancel all children.
- QList<ProgressItem * > kids = mChildren.keys();
- QList<ProgressItem * >::Iterator it(kids.begin());
- QList<ProgressItem * >::Iterator end(kids.end());
- for (; it != end; it++) {
- ProgressItem *kid = *it;
+ for (auto it = mChildren.cbegin(), end = mChildren.cend(); it != end; ++it) {
+ ProgressItem *kid = it.key();
if (kid->canBeCanceled()) {
kid->cancel();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic