diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-09 13:42:35 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-23 19:30:28 +0200 |
commit | 850d850c5af8ff77a4b9d53457ec6b1ba6c20cb3 (patch) | |
tree | 79af5853f71ca977c4e24eab609c0f07dcb04a7a /tests | |
parent | be714154fa3f9dd7f1a44952293eee037793e383 (diff) |
Use QMetaType instead of integer based type ids
Change the implementation of Qt DBus to use QMetaType directly
instead of integer based type ids.
Change-Id: I999023b58fa50dcc3504386467faf09874f7d2cf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/dbus/qdbusmarshall/common.h | 4 | ||||
-rw-r--r-- | tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp | 2 | ||||
-rw-r--r-- | tests/auto/tools/qmakelib/tst_qmakelib.cpp | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/dbus/qdbusmarshall/common.h b/tests/auto/dbus/qdbusmarshall/common.h index 6695567a80..3dfe3e39bb 100644 --- a/tests/auto/dbus/qdbusmarshall/common.h +++ b/tests/auto/dbus/qdbusmarshall/common.h @@ -386,7 +386,7 @@ inline bool compare(const QDBusArgument &arg, const QVariant &v2, T * = 0) bool compareToArgument(const QDBusArgument &arg, const QVariant &v2) { - if (arg.currentSignature() != QDBusMetaType::typeToSignature(v2.userType())) + if (arg.currentSignature() != QDBusMetaType::typeToSignature(v2.metaType())) return false; // try to demarshall the arg according to v2 @@ -521,7 +521,7 @@ bool compareToArgument(const QDBusArgument &arg, const QVariant &v2) } qWarning() << "Unexpected QVariant type" << v2.userType() - << QByteArray(QDBusMetaType::typeToSignature(v2.userType())) + << QByteArray(QDBusMetaType::typeToSignature(v2.metaType())) << v2.metaType().name(); return false; } diff --git a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp index 18503483ed..2217f112f8 100644 --- a/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp +++ b/tests/auto/dbus/qdbusmetatype/tst_qdbusmetatype.cpp @@ -354,7 +354,7 @@ void tst_QDBusMetaType::staticTypes() { QFETCH(QVariant::Type, typeId); - QString result = QDBusMetaType::typeToSignature(typeId); + QString result = QDBusMetaType::typeToSignature(QMetaType(typeId)); QTEST(result, "signature"); } diff --git a/tests/auto/tools/qmakelib/tst_qmakelib.cpp b/tests/auto/tools/qmakelib/tst_qmakelib.cpp index a699a0575e..d1830e2c17 100644 --- a/tests/auto/tools/qmakelib/tst_qmakelib.cpp +++ b/tests/auto/tools/qmakelib/tst_qmakelib.cpp @@ -81,6 +81,7 @@ void tst_qmakelib::proString() ProString s3("this is a longish string with bells and whistles"); s3 = s3.mid(18, 17); + QCOMPARE(s3.toQString(), QStringLiteral("string with bells")); // Prepend to detached string with lots of spare space in it. s3.prepend(ProString("another ")); QCOMPARE(s3.toQString(), QStringLiteral("another string with bells")); |