aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypewrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-06-26 13:45:56 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-02 16:32:56 +0000
commite61dca72682c9f65c6ab6254fc7e80b49be3ad43 (patch)
treee11413ad237abc8df737c4e55bc38a8012c2ae14 /src/qml/qml/qqmltypewrapper.cpp
parentaa6120cc3524b8d603e92e952aece7494a5d8f02 (diff)
Change data structures in QQmlMetaTypeData
Make sure any QQmlType stored in the meta type data has a refcount of 1. This should now make it possible to clean out unused types by iterating over the list of types and removing those that have a refcount of 1. Some care is still needed for C++ registered types, that will need to get one more refcount, so we don't accidentally remove them. Task-number: QTBUG-61536 Change-Id: Id2a18dae5ddcb815f34013f5fde1f05d2d9d0214 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypewrapper.cpp')
-rw-r--r--src/qml/qml/qqmltypewrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp
index 6fab7697f8..ba07b77c72 100644
--- a/src/qml/qml/qqmltypewrapper.cpp
+++ b/src/qml/qml/qqmltypewrapper.cpp
@@ -112,7 +112,7 @@ ReturnedValue QmlTypeWrapper::create(QV4::ExecutionEngine *engine, QObject *o, c
Scoped<QmlTypeWrapper> w(scope, engine->memoryManager->allocObject<QmlTypeWrapper>());
w->d()->mode = mode; w->d()->object = o;
- w->d()->typePrivate = t.handle();
+ w->d()->typePrivate = t.priv();
QQmlType::refHandle(w->d()->typePrivate);
return w.asReturnedValue();
}