diff options
author | BogDan Vatra <bogdan.vatra.ford@kdab.com> | 2016-05-18 14:52:17 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kdab.com> | 2016-05-24 12:46:16 +0000 |
commit | 0495acc9935bbbe1280330195362b93feda51e56 (patch) | |
tree | 57ef5d7c43050ac6a2c0b41b7b06d5615dd46418 /src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp | |
parent | 793462e126f0eab65de6d7f2f900db77630147bb (diff) |
Clear the exceeding elements and reserve enough elements for hash
Change-Id: I9a5ca2c55dc3a80bad8d476fb554db88809c1338
Reviewed-by: Continuous Integration (KDAB) <build@kdab.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp')
-rw-r--r-- | src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp b/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp index d99bc07..b4bf719 100644 --- a/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp +++ b/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp @@ -80,7 +80,7 @@ QAbstractItemModelReplicaPrivate::QAbstractItemModelReplicaPrivate() , m_rootItem(this) , m_lastRequested(-1) { - m_rootItem.children.cacheSize = DefaultRootCacheSize; + m_rootItem.children.setCacheSize(DefaultRootCacheSize); registerTypes(); initializeModelConnections(); connect(this, &QAbstractItemModelReplicaPrivate::availableRolesChanged, this, [this]{ @@ -94,7 +94,7 @@ QAbstractItemModelReplicaPrivate::QAbstractItemModelReplicaPrivate(QRemoteObject , m_rootItem(this) , m_lastRequested(-1) { - m_rootItem.children.cacheSize = DefaultRootCacheSize; + m_rootItem.children.setCacheSize(DefaultRootCacheSize); registerTypes(); initializeModelConnections(); initializeNode(node, name); @@ -909,7 +909,7 @@ size_t QAbstractItemModelReplica::rootCacheSize() const void QAbstractItemModelReplica::setRootCacheSize(size_t rootCacheSize) { - d->m_rootItem.children.cacheSize = rootCacheSize; + d->m_rootItem.children.setCacheSize(rootCacheSize); } QVector<int> QAbstractItemModelReplica::availableRoles() const |