aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
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/compiler
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/compiler')
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index f5cb468479..e17ab354cf 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -344,7 +344,7 @@ bool SignalHandlerConverter::convertSignalHandlerExpressionsToFunctionDeclaratio
if (binding->type == QV4::CompiledData::Binding::Type_AttachedProperty) {
const QmlIR::Object *attachedObj = qmlObjects.at(binding->value.objectIndex);
auto *typeRef = resolvedTypes.value(binding->propertyNameIndex);
- QQmlType type = typeRef ? typeRef->type : nullptr;
+ QQmlType type = typeRef ? typeRef->type : QQmlType();
if (!type.isValid()) {
if (imports->resolveType(propertyName, &type, 0, 0, 0)) {
if (type.isComposite()) {