Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/core/datamodel.h
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Line(s) | 249 | private: | |||
---|---|---|---|---|---|
256 | QHash<int, QByteArray> m_roleNames; | 256 | QHash<int, QByteArray> m_roleNames; | ||
257 | QHash<QString, int> m_roleIds; | 257 | QHash<QString, int> m_roleIds; | ||
258 | int m_maxRoleId; | 258 | int m_maxRoleId; | ||
259 | }; | 259 | }; | ||
260 | 260 | | |||
261 | int DataModel::countItems() const | 261 | int DataModel::countItems() const | ||
262 | { | 262 | { | ||
263 | int count = 0; | 263 | int count = 0; | ||
264 | foreach (const QVector<QVariant> &v, m_items) { | 264 | for (const QVector<QVariant> &v : qAsConst(m_items)) { | ||
265 | count += v.count(); | 265 | count += v.count(); | ||
266 | } | 266 | } | ||
267 | return count; | 267 | return count; | ||
268 | } | 268 | } | ||
269 | 269 | | |||
270 | } | 270 | } | ||
271 | #endif | 271 | #endif |