diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-10 17:05:10 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-23 09:58:57 +0200 |
commit | 11bad6109606794091adc3b8a14070ac09707f45 (patch) | |
tree | 603d07bada752a534a8549c6d008b9b8a4aa832a /src/corelib/kernel/qmetaobject.h | |
parent | a618c260ed0d1de711a5bc20337f9b8c3835c407 (diff) |
Deprecate QVariant::Type
It's been obsolete for a long time already. Make sure
the compiler now warns about it and remove all remaining
uses in qtbase.
Change-Id: I0ff80311184dba52d2ba5f4e2fabe0d47fdc59d7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.h')
-rw-r--r-- | src/corelib/kernel/qmetaobject.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h index 08c57d5f28..686e4aeeb8 100644 --- a/src/corelib/kernel/qmetaobject.h +++ b/src/corelib/kernel/qmetaobject.h @@ -280,8 +280,15 @@ public: const char *name() const; const char *typeName() const; - QVariant::Type type() const; - int userType() const; +#if QT_DEPRECATED_SINCE(6, 0) + QT_WARNING_PUSH + QT_WARNING_DISABLE_DEPRECATED + QT_DEPRECATED_VERSION_6_0 + QVariant::Type type() const + { int t = userType(); return t >= QMetaType::User ? QVariant::UserType : QVariant::Type(t); } + QT_WARNING_POP +#endif + int userType() const { return metaType().id(); } QMetaType metaType() const; int propertyIndex() const; int relativePropertyIndex() const; |