forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user