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