From 49a11e882059ee1729f776722e085dd21d378c36 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 23 Jun 2017 13:20:23 +0200 Subject: Use QQmlType by value QQmlType is now refcounted, and we need to use it by value, to control it's lifetime properly. This is required, so we can clean up the QQmlMetaTypeData cache on engine destruction and with trimComponentCache() Task-number: QTBUG-61536 Change-Id: If86391c86ea20a646ded7c9925d8f743f628fb91 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4engine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4engine.cpp') diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 0cb1b1ee13..0c4facda4d 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -785,10 +785,10 @@ ReturnedValue ExecutionEngine::qmlSingletonWrapper(String *name) QQmlTypeNameCache::Result r = ctx->imports->query(name); Q_ASSERT(r.isValid()); - Q_ASSERT(r.type); - Q_ASSERT(r.type->isSingleton()); + Q_ASSERT(r.type.isValid()); + Q_ASSERT(r.type.isSingleton()); - QQmlType::SingletonInstanceInfo *siinfo = r.type->singletonInstanceInfo(); + QQmlType::SingletonInstanceInfo *siinfo = r.type.singletonInstanceInfo(); QQmlEngine *e = qmlEngine(); siinfo->init(e); -- cgit v1.2.3