diff options
Diffstat (limited to 'src/qdbus/qdbusviewer/qdbusmodel.cpp')
-rw-r--r-- | src/qdbus/qdbusviewer/qdbusmodel.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qdbus/qdbusviewer/qdbusmodel.cpp b/src/qdbus/qdbusviewer/qdbusmodel.cpp index 0da1dea44..9bb0dd97b 100644 --- a/src/qdbus/qdbusviewer/qdbusmodel.cpp +++ b/src/qdbus/qdbusviewer/qdbusmodel.cpp @@ -32,7 +32,7 @@ struct QDBusItem s.prepend(item->name); item = item->parent; } - if (s.length() > 1) + if (s.size() > 1) s.chop(1); // remove tailing slash return s; } @@ -160,7 +160,7 @@ QModelIndex QDBusModel::index(int row, int column, const QModelIndex &parent) co if (!item) item = root; - if (column != 0 || row < 0 || row >= item->children.count()) + if (column != 0 || row < 0 || row >= item->children.size()) return QModelIndex(); return createIndex(row, 0, item->children.at(row)); @@ -183,7 +183,7 @@ int QDBusModel::rowCount(const QModelIndex &parent) const if (!item->isPrefetched) const_cast<QDBusModel *>(this)->addPath(item); - return item->children.count(); + return item->children.size(); } int QDBusModel::columnCount(const QModelIndex &) const @@ -229,7 +229,7 @@ void QDBusModel::refresh(const QModelIndex &aIndex) item = root; if (!item->children.isEmpty()) { - beginRemoveRows(index, 0, item->children.count() - 1); + beginRemoveRows(index, 0, item->children.size() - 1); qDeleteAll(item->children); item->children.clear(); endRemoveRows(); @@ -237,7 +237,7 @@ void QDBusModel::refresh(const QModelIndex &aIndex) addPath(item); if (!item->children.isEmpty()) { - beginInsertRows(index, 0, item->children.count() - 1); + beginInsertRows(index, 0, item->children.size() - 1); endInsertRows(); } } @@ -291,7 +291,7 @@ QModelIndex QDBusModel::findObject(const QDBusObjectPath &objectPath) childIdx = -1; // do a linear search over all the children - for (int i = 0; i < item->children.count(); ++i) { + for (int i = 0; i < item->children.size(); ++i) { QDBusItem *child = item->children.at(i); if (child->type == PathItem && child->name == branch) { item = child; |