summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-10 12:25:27 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 00:17:04 +0200
commit0daa9dbfc4c2d91dfa7110070834498693c6168a (patch)
tree3fd4732d6008e7d4e3e8663ba55b21616560a8e3 /tests
parentbd64f9397ac6c7aa4368d92138929e858e3df107 (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.h5
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());