diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2020-01-07 11:37:01 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-03-09 10:54:37 +0100 |
commit | f3dccc334f01d088fcdf1c2016c8153fe6154b61 (patch) | |
tree | 7b8148f8ba1dcf53fc9f56a46fa42e810b699316 /src/qml/qml/qqmltypewrapper.cpp | |
parent | f65c0e7190c4f2ebcadc963cf0647c71de26f3bb (diff) |
Adapt to the the new QMetaType change
Fixes: QTBUG-82453
Change-Id: I7e5682945a07c3af183becd3947a69568f139d16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypewrapper.cpp')
-rw-r--r-- | src/qml/qml/qqmltypewrapper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp index fa5d36503d..7bcc5e9900 100644 --- a/src/qml/qml/qqmltypewrapper.cpp +++ b/src/qml/qml/qqmltypewrapper.cpp @@ -407,9 +407,9 @@ ReturnedValue QQmlTypeWrapper::virtualInstanceOf(const Object *typeObject, const if (!wrapperObject) return engine->throwTypeError(); - const int myTypeId = typeWrapper->d()->type().typeId(); + const QMetaType myTypeId = typeWrapper->d()->type().typeId(); QQmlMetaObject myQmlType; - if (myTypeId == 0) { + if (!myTypeId.isValid()) { // we're a composite type; a composite type cannot be equal to a // non-composite object instance (Rectangle{} is never an instance of // CustomRectangle) @@ -420,9 +420,9 @@ ReturnedValue QQmlTypeWrapper::virtualInstanceOf(const Object *typeObject, const QQmlRefPointer<QQmlTypeData> td = qenginepriv->typeLoader.getType(typeWrapper->d()->type().sourceUrl()); ExecutableCompilationUnit *cu = td->compilationUnit(); - myQmlType = qenginepriv->metaObjectForType(cu->metaTypeId); + myQmlType = qenginepriv->metaObjectForType(cu->metaTypeId.id()); } else { - myQmlType = qenginepriv->metaObjectForType(myTypeId); + myQmlType = qenginepriv->metaObjectForType(myTypeId.id()); } const QMetaObject *theirType = wrapperObject->metaObject(); |