diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-08-20 18:31:06 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-08-26 01:03:22 +0200 |
commit | acbf9a858b6b389103b7f43f4f4892a142ec56c6 (patch) | |
tree | 1c5e7feae0cd6999e37fca0644d152c76d29a790 /tests/auto/corelib/kernel/qvariant | |
parent | db21bad936a761f475145886f1e06dfcfa11eb80 (diff) |
Cleanup QTypeInfo
Remove QTypeInfo::isStatic, as that's not used anymore in Qt 6.
Also remove sizeOf, it's unused, and we have QMetaType for that if
required.
Remove all typeinfo declaractions for trivial types, as the default
template covers them correctly nowadays.
Finally set up a better default for isPointer, and do some smaller
cleanups all over the place.
Change-Id: I6758ed37dfc701feaaf0ff105cc95e32da9f9c33
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/kernel/qvariant')
-rw-r--r-- | tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index b871bfcac9..5fa06c4f46 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -3187,7 +3187,7 @@ template<class T> void playWithVariant(const T &orig, bool isNull, const QString { QVariant v2 = v; - if (!(QTypeInfo<T>::isStatic && QTypeInfo<T>::isComplex)) { + if (QTypeInfo<T>::isRelocatable) { // Type is movable so standard comparison algorithm in QVariant should work // In a custom type QVariant is not aware of ==operator so it won't be called, // which may cause problems especially visible when using a not-movable type @@ -3204,7 +3204,7 @@ template<class T> void playWithVariant(const T &orig, bool isNull, const QString v = QVariant(); QCOMPARE(v3, v); v = v2; - if (!(QTypeInfo<T>::isStatic && QTypeInfo<T>::isComplex)) { + if (QTypeInfo<T>::isRelocatable) { // Type is movable so standard comparison algorithm in QVariant should work // In a custom type QVariant is not aware of ==operator so it won't be called, // which may cause problems especially visible when using a not-movable type |