diff options
Diffstat (limited to 'src/qml/qmltc')
-rw-r--r-- | src/qml/qmltc/qqmltcobjectcreationhelper.cpp | 38 | ||||
-rw-r--r-- | src/qml/qmltc/qqmltcobjectcreationhelper_p.h | 2 | ||||
-rw-r--r-- | src/qml/qmltc/supportlibrary/qqmlcppbinding_p.h | 2 | ||||
-rw-r--r-- | src/qml/qmltc/supportlibrary/qqmlcpponassignment_p.h | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/src/qml/qmltc/qqmltcobjectcreationhelper.cpp b/src/qml/qmltc/qqmltcobjectcreationhelper.cpp index db8517ca70..bab86de1b9 100644 --- a/src/qml/qmltc/qqmltcobjectcreationhelper.cpp +++ b/src/qml/qmltc/qqmltcobjectcreationhelper.cpp @@ -21,31 +21,31 @@ void qmltcCreateDynamicMetaObject(QObject *object, const QmltcTypeData &data) // tie qmlTypePrivate destruction to objects's destruction. the type's // content is not needed once the associated object is deleted - QObject::connect(object, &QObject::destroyed, - [qmlTypePrivate](QObject *) { qmlTypePrivate->release(); }); + QObject::connect(object, &QObject::destroyed, object, + [qmlTypePrivate](QObject *) { qmlTypePrivate->release(); }, + Qt::DirectConnection); // initialize QQmlType::QQmlCppTypeData Q_ASSERT(data.regType == QQmlType::CppType); - qmlTypePrivate->extraData.cd->allocationSize = data.allocationSize; - qmlTypePrivate->extraData.cd->newFunc = nullptr; - qmlTypePrivate->extraData.cd->userdata = nullptr; - qmlTypePrivate->extraData.cd->noCreationReason = + qmlTypePrivate->extraData.cppTypeData->allocationSize = data.allocationSize; + qmlTypePrivate->extraData.cppTypeData->newFunc = nullptr; + qmlTypePrivate->extraData.cppTypeData->userdata = nullptr; + qmlTypePrivate->extraData.cppTypeData->noCreationReason = QStringLiteral("Qmltc-compiled type is not creatable via QQmlType"); - qmlTypePrivate->extraData.cd->createValueTypeFunc = nullptr; - qmlTypePrivate->extraData.cd->parserStatusCast = -1; - qmlTypePrivate->extraData.cd->extFunc = nullptr; - qmlTypePrivate->extraData.cd->extMetaObject = nullptr; - qmlTypePrivate->extraData.cd->customParser = nullptr; - qmlTypePrivate->extraData.cd->attachedPropertiesFunc = nullptr; - qmlTypePrivate->extraData.cd->attachedPropertiesType = nullptr; - qmlTypePrivate->extraData.cd->propertyValueSourceCast = -1; - qmlTypePrivate->extraData.cd->propertyValueInterceptorCast = -1; - qmlTypePrivate->extraData.cd->finalizerCast = -1; - qmlTypePrivate->extraData.cd->registerEnumClassesUnscoped = false; - qmlTypePrivate->extraData.cd->registerEnumsFromRelatedTypes = false; + qmlTypePrivate->extraData.cppTypeData->createValueTypeFunc = nullptr; + qmlTypePrivate->extraData.cppTypeData->parserStatusCast = -1; + qmlTypePrivate->extraData.cppTypeData->extFunc = nullptr; + qmlTypePrivate->extraData.cppTypeData->extMetaObject = nullptr; + qmlTypePrivate->extraData.cppTypeData->customParser = nullptr; + qmlTypePrivate->extraData.cppTypeData->attachedPropertiesFunc = nullptr; + qmlTypePrivate->extraData.cppTypeData->attachedPropertiesType = nullptr; + qmlTypePrivate->extraData.cppTypeData->propertyValueSourceCast = -1; + qmlTypePrivate->extraData.cppTypeData->propertyValueInterceptorCast = -1; + qmlTypePrivate->extraData.cppTypeData->finalizerCast = -1; + qmlTypePrivate->extraData.cppTypeData->registerEnumClassesUnscoped = false; + qmlTypePrivate->extraData.cppTypeData->registerEnumsFromRelatedTypes = false; qmlTypePrivate->baseMetaObject = data.metaObject; - qmlTypePrivate->init(); QQmlType qmlType(qmlTypePrivate); Q_ASSERT(qmlType.isValid()); diff --git a/src/qml/qmltc/qqmltcobjectcreationhelper_p.h b/src/qml/qmltc/qqmltcobjectcreationhelper_p.h index ae4633ac43..fe0cdcfed2 100644 --- a/src/qml/qmltc/qqmltcobjectcreationhelper_p.h +++ b/src/qml/qmltc/qqmltcobjectcreationhelper_p.h @@ -118,7 +118,7 @@ struct QmltcTypeData } }; -Q_QML_PRIVATE_EXPORT void qmltcCreateDynamicMetaObject(QObject *object, const QmltcTypeData &data); +Q_QML_EXPORT void qmltcCreateDynamicMetaObject(QObject *object, const QmltcTypeData &data); QT_END_NAMESPACE diff --git a/src/qml/qmltc/supportlibrary/qqmlcppbinding_p.h b/src/qml/qmltc/supportlibrary/qqmlcppbinding_p.h index 0f2e6a4998..a1c60012bc 100644 --- a/src/qml/qmltc/supportlibrary/qqmlcppbinding_p.h +++ b/src/qml/qmltc/supportlibrary/qqmlcppbinding_p.h @@ -32,7 +32,7 @@ QT_BEGIN_NAMESPACE -struct Q_QML_PRIVATE_EXPORT QQmlCppBinding +struct Q_QML_EXPORT QQmlCppBinding { // TODO: this might instead be put into the QQmlEngine or QQmlAnyBinding? static QUntypedPropertyBinding diff --git a/src/qml/qmltc/supportlibrary/qqmlcpponassignment_p.h b/src/qml/qmltc/supportlibrary/qqmlcpponassignment_p.h index 9c854430dc..cd8014895f 100644 --- a/src/qml/qmltc/supportlibrary/qqmlcpponassignment_p.h +++ b/src/qml/qmltc/supportlibrary/qqmlcpponassignment_p.h @@ -30,7 +30,7 @@ QT_BEGIN_NAMESPACE (unintentionally?). This API allows to avoid manual casts to base types as the C++ compiler would implicitly cast derived classes in this case. */ -struct Q_QML_PRIVATE_EXPORT QQmlCppOnAssignmentHelper +struct Q_QML_EXPORT QQmlCppOnAssignmentHelper { // TODO: in theory, this API might just accept QObject * and int that would // give the QMetaProperty. using the meta property, one could create |