ExternalTools: Remove unneeded temporary container

keys().count() is the same as size() directly

Change-Id: I6606ebf431e6f472ba4bd346c5851fa6aa99ffdf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Eike Ziller
2017-10-19 10:26:45 +02:00
parent e26ac60f17
commit 981071d486

View File

@@ -184,7 +184,7 @@ QModelIndex ExternalToolModel::index(int row, int column, const QModelIndex &par
if (row < items.count())
return createIndex(row, 0, items.at(row));
}
} else if (column == 0 && row < m_tools.keys().count()) {
} else if (column == 0 && row < m_tools.size()) {
return createIndex(row, 0);
}
return QModelIndex();
@@ -208,7 +208,7 @@ QModelIndex ExternalToolModel::parent(const QModelIndex &child) const
int ExternalToolModel::rowCount(const QModelIndex &parent) const
{
if (!parent.isValid())
return m_tools.keys().count();
return m_tools.size();
if (toolForIndex(parent))
return 0;
bool found;