summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp4
-rw-r--r--tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
index 28ca3b8e7b..87d9774358 100644
--- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
+++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp
@@ -128,7 +128,7 @@ void tst_QGuiVariant::constructor_invalid()
QFETCH(uint, typeId);
{
QTest::ignoreMessage(QtWarningMsg, QRegularExpression("^Trying to construct an instance of an invalid type, type id:"));
- QVariant variant(static_cast<QVariant::Type>(typeId));
+ QVariant variant{QMetaType(typeId)};
QVERIFY(!variant.isValid());
QCOMPARE(variant.userType(), int(QMetaType::UnknownType));
}
@@ -655,7 +655,7 @@ void tst_QGuiVariant::debugStream_data()
const char *tagName = QMetaType(id).name();
if (!tagName)
continue;
- QTest::newRow(tagName) << QVariant(static_cast<QVariant::Type>(id)) << id;
+ QTest::newRow(tagName) << QVariant(QMetaType(id)) << id;
}
}
diff --git a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
index a641a3adba..d0f19dd9a3 100644
--- a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
+++ b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
@@ -154,7 +154,7 @@ static void dumpConfiguration(QTextStream &str)
// On Windows, this will provide addition GPU info similar to the output of dxdiag.
if (QGuiApplication::platformNativeInterface()) {
const QVariant gpuInfoV = QGuiApplication::platformNativeInterface()->property("gpu");
- if (gpuInfoV.type() == QVariant::Map) {
+ if (gpuInfoV.userType() == QMetaType::QVariantMap) {
const QString description = gpuInfoV.toMap().value(QStringLiteral("printable")).toString();
if (!description.isEmpty())
str << "\nGPU:\n" << description << "\n\n";