aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/taskmodel.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-03-14 14:14:48 +0100
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2013-03-15 13:24:29 +0100
commitfff7c62b8a8354d680fcc397b9b432ff681a39f8 (patch)
tree8e0ea75d3cf65af96c8b125f9c69c355648324d6 /src/plugins/projectexplorer/taskmodel.cpp
parent0fcbbbd4eead56421e1af061c614d915363dee7a (diff)
Fix Krazy warnings about values or keys iteration in project management.
Change-Id: I70674ac326f508b53f50b4dbbc5e051dbdd9017d Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/projectexplorer/taskmodel.cpp')
-rw-r--r--src/plugins/projectexplorer/taskmodel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/taskmodel.cpp b/src/plugins/projectexplorer/taskmodel.cpp
index e132f44840..2470f06632 100644
--- a/src/plugins/projectexplorer/taskmodel.cpp
+++ b/src/plugins/projectexplorer/taskmodel.cpp
@@ -182,13 +182,16 @@ void TaskModel::updateTaskLineNumber(unsigned int id, int line)
void TaskModel::clearTasks(const Core::Id &categoryId)
{
+ typedef QHash<Core::Id,CategoryData>::ConstIterator IdCategoryConstIt;
+
if (categoryId.uniqueIdentifier() == 0) {
if (m_tasks.count() == 0)
return;
beginRemoveRows(QModelIndex(), 0, m_tasks.count() -1);
m_tasks.clear();
- foreach (const Core::Id &key, m_categories.keys())
- m_categories[key].clear();
+ const IdCategoryConstIt cend = m_categories.constEnd();
+ for (IdCategoryConstIt it = m_categories.constBegin(); it != cend; ++it)
+ m_categories[it.key()].clear();
endRemoveRows();
} else {
int index = 0;