summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-06-01 11:31:17 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-06-01 13:03:05 +0200
commita1eb1711cbc025257a4e3562af6c5097abb697ce (patch)
treea53089ce199128c827a1eedafbdd021d2702dda7 /tests
parenteb41b44cf8afd9ef34ae98bcd5c6b611c6cfafd0 (diff)
Fix debug-printing of lists of QScxmlEvent
The previous code only worked because the relevant QTypeTraits templates were only instantiated after the first operator<< was defined. We cannot rely on this. Fixes: QTBUG-94125 Change-Id: I86e1b146cf83e337c87893ef0e2dc02e7edb3671 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/scion/tst_scion.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/scion/tst_scion.cpp b/tests/auto/scion/tst_scion.cpp
index 70b649c..16142d4 100644
--- a/tests/auto/scion/tst_scion.cpp
+++ b/tests/auto/scion/tst_scion.cpp
@@ -384,6 +384,11 @@ QDebug operator<<(QDebug debug, const QScxmlEvent &event)
obj.insert(QLatin1String("invokeid"), event.invokeId());
return debug << obj;
}
+
+QDebug operator<<(QDebug debug, const QList<QScxmlEvent> &events)
+{
+ return QtPrivate::printSequentialContainer(debug, "QList", events);
+}
QT_END_NAMESPACE
static int verifyEvent(const QList<QScxmlEvent> &receivedEvents, const QJsonObject &event,