diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-07-10 12:25:27 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-08-24 00:17:04 +0200 |
commit | 0daa9dbfc4c2d91dfa7110070834498693c6168a (patch) | |
tree | 3fd4732d6008e7d4e3e8663ba55b21616560a8e3 /tests | |
parent | bd64f9397ac6c7aa4368d92138929e858e3df107 (diff) |
Generate less code when creating QMetaTypeInterfaces
There is no need to generate wrapper functions for equals,
lessThan or debugStream for pointer types, as those can
easily be handled by a few lines of code in QMetaType itself.
Change-Id: If79b3bc3a629249c1d17c9e592202f08b59f80ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/other/qvariant_common/tst_qvariant_common.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/other/qvariant_common/tst_qvariant_common.h b/tests/auto/other/qvariant_common/tst_qvariant_common.h index d7e0b7786a..6b69d04a78 100644 --- a/tests/auto/other/qvariant_common/tst_qvariant_common.h +++ b/tests/auto/other/qvariant_common/tst_qvariant_common.h @@ -62,10 +62,9 @@ protected: // Chars insert '\0' into the qdebug stream, it is not possible to find a real string length return; } - if (QMetaType::typeFlags(currentId) & QMetaType::PointerToQObject) { + if (QMetaType::typeFlags(currentId) & QMetaType::IsPointer) { QByteArray currentName = QMetaType::typeName(currentId); - currentName.chop(1); - ok &= (msg.contains(", " + currentName) || msg.contains(", 0x0")); + ok &= msg.contains(currentName + ", 0x"); } ok &= msg.endsWith(QLatin1Char(')')); QVERIFY2(ok, (QString::fromLatin1("Message is not correctly finished: '") + msg + '\'').toLatin1().constData()); |