diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-03-05 10:36:19 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-03-05 15:54:50 +0100 |
commit | a7deb047d14170cf16160c748150471456e04af4 (patch) | |
tree | aaf7913b60ffb6f8ba1830d620b8d68641d05741 /src/qml/qml/qqmlmetatype.cpp | |
parent | a9efc8e9dda35c1844c990991cea14a74ddeaf81 (diff) |
Simplify QQmlPropertyData::flagsForProperty; remove typeCategory
We do not need to call QQmlMetaType::typeCategory. The information
whether a type is a QObject or a QML list type is already stored in the
metaobject, and checked in the earlier if branches. Thus, typeCategory
could only ever return Unknown.
As this removes the only real caller of QQmlMetaType::typeCategory, we
can remove the function. QQmlEnginePrivate::typeCategory also called it,
but wasn't called itself (and is now also removed) .
Change-Id: Iea6055ba44de4d71334f40895e7ce85c3230f3d9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlmetatype.cpp')
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 7ce57c8d9f..8369634889 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -1184,26 +1184,6 @@ QMetaMethod QQmlMetaType::defaultMethod(QObject *obj) return defaultMethod(metaObject); } -QQmlMetaType::TypeCategory QQmlMetaType::typeCategory(int userType) -{ - if (userType < 0) - return Unknown; - if (userType == QMetaType::QObjectStar) - return Object; - - QMetaType type(userType); - if (type.flags().testFlag(QMetaType::PointerToQObject)) - return Object; - else if (type.flags().testFlag(QMetaType::IsQmlList)) - return List; - - QQmlMetaTypeDataPtr data; - if (data->qmlLists.contains(userType)) - return List; - else - return Unknown; -} - /*! See qmlRegisterInterface() for information about when this will return true. */ |