diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2019-12-03 20:24:38 +0100 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2020-01-17 11:31:35 +0100 |
commit | c6899f16389458766904d8d913054f09076e06dd (patch) | |
tree | e24f942a01720775391ae04557e24a35839f7361 /src/qml/qml/qqmlpropertycache.cpp | |
parent | 9e674be4fb8c369873a009f58e3152a12d2c4cce (diff) |
Replace QVariant::type with QVariant::userType
as type is going to be deprecated.
This change was done automatically with the help of clazy.
In addition, ColumnRoleMetadata was changed to take an int instead
of a QVariant::Type
Change-Id: Ibc02d7b52e7d931a56c19fdebc4788b5e6df2a39
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 69957ab282..bddea57622 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -92,7 +92,7 @@ static void flagsForPropertyType(int propType, QQmlPropertyData::Flags &flags) flags.type = QQmlPropertyData::Flags::QObjectDerivedType; } else if (propType == QMetaType::QVariant) { flags.type = QQmlPropertyData::Flags::QVariantType; - } else if (propType < static_cast<int>(QVariant::UserType)) { + } else if (propType < static_cast<int>(QMetaType::User)) { // nothing to do } else if (propType == qMetaTypeId<QQmlBinding *>()) { flags.type = QQmlPropertyData::Flags::QmlBindingType; @@ -136,14 +136,14 @@ static void populate(QQmlPropertyData *data, const QMetaProperty &p) void QQmlPropertyData::lazyLoad(const QMetaProperty &p) { populate(this, p); - int type = static_cast<int>(p.type()); + int type = static_cast<int>(p.userType()); if (type == QMetaType::QObjectStar) { setPropType(type); m_flags.type = Flags::QObjectDerivedType; } else if (type == QMetaType::QVariant) { setPropType(type); m_flags.type = Flags::QVariantType; - } else if (type == QVariant::UserType || type == -1) { + } else if (type >= QMetaType::User || type == 0) { m_flags.notFullyResolved = true; } else { setPropType(type); @@ -314,7 +314,7 @@ void QQmlPropertyCache::appendSignal(const QString &name, QQmlPropertyData::Flag const QList<QByteArray> &names) { QQmlPropertyData data; - data.setPropType(QVariant::Invalid); + data.setPropType(QMetaType::UnknownType); data.setCoreIndex(coreIndex); data.setFlags(flags); data.setArguments(nullptr); |