diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-09-13 16:13:21 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-09-14 13:50:46 +0200 |
commit | 8f00b65d753db647b49f551319b04819e9e4e882 (patch) | |
tree | 151d8372609c9d931650b26c61cb0b541e03f055 /src/qml/qml/qqml.h | |
parent | 584f674811f87218dedd95be19525061e378f191 (diff) |
Qml: use an enum for the registration struct versions
This way we can see more easily what we're checking for.
Change-Id: I44b16e8b71ec967b736a4fe5fe0fcbdf28692b90
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.h')
-rw-r--r-- | src/qml/qml/qqml.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index 3fc00d6316..e45dd1bfdc 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -56,7 +56,7 @@ template<typename T> int qmlRegisterAnonymousType(const char *uri, int versionMajor) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), 0, @@ -89,7 +89,7 @@ template<typename T, int metaObjectRevisionMinor> int qmlRegisterAnonymousType(const char *uri, int versionMajor) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), 0, @@ -137,7 +137,7 @@ template<typename T> int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), 0, @@ -170,7 +170,7 @@ template<typename T, int metaObjectRevision> int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), 0, @@ -210,7 +210,7 @@ int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int ve } QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), 0, @@ -250,7 +250,7 @@ int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int ve } QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), 0, @@ -285,7 +285,7 @@ template<typename T> int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), sizeof(T), QQmlPrivate::Constructors<T>::createInto, nullptr, @@ -316,7 +316,7 @@ template<typename T, int metaObjectRevision> int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), sizeof(T), QQmlPrivate::Constructors<T>::createInto, nullptr, @@ -347,7 +347,7 @@ template<typename T, int metaObjectRevision> int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), sizeof(T), QQmlPrivate::Constructors<T>::createInto, nullptr, @@ -378,7 +378,7 @@ template<typename T, typename E> int qmlRegisterExtendedType(const char *uri, int versionMajor) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), 0, @@ -419,7 +419,7 @@ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, } QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), sizeof(T), QQmlPrivate::Constructors<T>::createInto, nullptr, @@ -469,7 +469,7 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, QQmlCustomParser *parser) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), sizeof(T), QQmlPrivate::Constructors<T>::createInto, nullptr, @@ -501,7 +501,7 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, QQmlCustomParser *parser) { QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), sizeof(T), QQmlPrivate::Constructors<T>::createInto, nullptr, @@ -540,7 +540,7 @@ int qmlRegisterCustomExtendedType(const char *uri, int versionMajor, int version } QQmlPrivate::RegisterType type = { - 1, + QQmlPrivate::RegisterType::CurrentVersion, QQmlPrivate::QmlMetaType<T>::self(), QQmlPrivate::QmlMetaType<T>::list(), sizeof(T), QQmlPrivate::Constructors<T>::createInto, nullptr, |