aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmetatype.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-02-06 16:06:39 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-03-19 10:19:21 +0000
commit80920a3012239644ac0aba8c37a9a05e22e34b5a (patch)
treefb14f0868e3fad08db87af571ae5df4a1c711a43 /src/qml/qml/qqmlmetatype.cpp
parent87af9e7396229907f712f50d803d8c16b0652efc (diff)
Use QQmlRefCount for QQmlType(Private)
As we already have an implementation of refcounting, we can just use that intead of inventing another one. This also gives us nice move ctors and operators. Also, use const pointers to QQmlTypePrivate where possible. This exposes quite some nastiness that needs to be fixed in follow-up commits: All the mutable members of QQmlTypePrivate are unsafe for multithreaded use. Change-Id: I3be8f2c53d86e06ffa80c8df8830473fe6d1d91d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlmetatype.cpp')
-rw-r--r--src/qml/qml/qqmlmetatype.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index a034d72221..0da96f61e4 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -1220,7 +1220,7 @@ void QQmlMetaType::freeUnusedTypesAndCaches()
QList<QQmlType>::Iterator it = data->types.begin();
while (it != data->types.end()) {
const QQmlTypePrivate *d = (*it).priv();
- if (d && d->refCount == 1) {
+ if (d && d->count() == 1) {
deletedAtLeastOneType = true;
removeQQmlTypePrivate(data->idToType, d);