From a0c61e70eeefbf9d6c632a94d29bcc2a7e97b7d7 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Tue, 24 Oct 2017 09:02:03 -0700 Subject: 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 --- src/lib/corelib/tools/settingsmodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/corelib/tools/settingsmodel.cpp') 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)); } -- cgit v1.2.3