summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h')
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
index 84ba7af294..9fb5b63262 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
@@ -115,6 +115,14 @@ private slots:
void typesWithInaccessibleDTors();
void voidIsNotUnknown();
void typeNameNormalization();
+
+ // Tests for deprecated APIs
+#if QT_DEPRECATED_SINCE(6, 0)
+ void testDeprecatedGetters_data() { type_data(); }
+ void testDeprecatedGetters();
+ void testDeprecatedLoadSave_data() { saveAndLoadBuiltin_data(); }
+ void testDeprecatedLoadSave();
+#endif
};
template <typename T>
@@ -262,7 +270,7 @@ Q_DECLARE_METATYPE(CustomMovable);
const QVariant v = QVariant::fromValue(t); \
QByteArray tn = createTypeName(#CONTAINER "<", #__VA_ARGS__); \
const int expectedType = ::qMetaTypeId<CONTAINER< __VA_ARGS__ > >(); \
- const int type = QMetaType::type(tn); \
+ const int type = QMetaType::fromName(tn).id(); \
QCOMPARE(type, expectedType); \
QCOMPARE((QMetaType::fromType<CONTAINER< __VA_ARGS__ >>().id()), expectedType); \
}