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.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
index 84ba7af294..1694e49491 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
@@ -1,5 +1,5 @@
// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QTest>
#include "tst_qmetatype_common.h"
@@ -45,7 +45,9 @@ private:
private slots:
void defined();
+#if QT_CONFIG(thread)
void threadSafety();
+#endif
void namespaces();
void id();
void qMetaTypeId();
@@ -75,6 +77,7 @@ private slots:
void flagsBinaryCompatibility6_0();
void construct_data();
void construct();
+ void defaultConstructTrivial_QTBUG_109594();
void typedConstruct();
void constructCopy_data();
void constructCopy();
@@ -88,6 +91,8 @@ private slots:
void isRegisteredStaticLess();
void isNotRegistered();
void isEnum();
+ void underlyingType_data();
+ void underlyingType();
void automaticTemplateRegistration_1();
void automaticTemplateRegistration_2(); // defined in tst_qmetatype3.cpp
void saveAndLoadBuiltin_data();
@@ -115,6 +120,15 @@ private slots:
void typesWithInaccessibleDTors();
void voidIsNotUnknown();
void typeNameNormalization();
+ void typeNameInQtPrivate();
+
+ // 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 +276,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); \
}