aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/settingsmodel.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-10-24 09:02:03 -0700
committerJake Petroules <jake.petroules@qt.io>2017-11-15 16:57:54 +0000
commita0c61e70eeefbf9d6c632a94d29bcc2a7e97b7d7 (patch)
tree10ae236ef25cc2284377ab7bf29a315ad6a7444c /src/lib/corelib/tools/settingsmodel.cpp
parent9d8ad8027a34de6871f753047a160b3b3ec65368 (diff)
STL compatibility: use size() instead of count()
This is a simple find and replace with manual sanity check. Change-Id: Ia733befe7885dc3c643d5c84e151312bfd86a3c6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/settingsmodel.cpp')
-rw-r--r--src/lib/corelib/tools/settingsmodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/corelib/tools/settingsmodel.cpp b/src/lib/corelib/tools/settingsmodel.cpp
index 4544fa5d0..c24c58d2c 100644
--- a/src/lib/corelib/tools/settingsmodel.cpp
+++ b/src/lib/corelib/tools/settingsmodel.cpp
@@ -166,7 +166,7 @@ void SettingsModel::addNewKey(const QModelIndex &parent)
Node * const newNode = new Node;
newNode->parent = parentNode;
newNode->name = parentNode->uniqueChildName();
- beginInsertRows(parent, parentNode->children.count(), parentNode->children.count());
+ beginInsertRows(parent, parentNode->children.size(), parentNode->children.size());
parentNode->children << newNode;
endInsertRows();
d->dirty = true;
@@ -247,7 +247,7 @@ int SettingsModel::rowCount(const QModelIndex &parent) const
return 0;
const Node * const node = d->indexToNode(parent);
Q_ASSERT(node);
- return node->children.count();
+ return node->children.size();
}
QVariant SettingsModel::data(const QModelIndex &index, int role) const
@@ -302,7 +302,7 @@ QModelIndex SettingsModel::index(int row, int column, const QModelIndex &parent)
{
const Node * const parentNode = d->indexToNode(parent);
Q_ASSERT(parentNode);
- if (parentNode->children.count() <= row)
+ if (parentNode->children.size() <= row)
return QModelIndex();
return createIndex(row, column, parentNode->children.at(row));
}