From a1eb1711cbc025257a4e3562af6c5097abb697ce Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 1 Jun 2021 11:31:17 +0200 Subject: 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 --- tests/auto/scion/tst_scion.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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 &events) +{ + return QtPrivate::printSequentialContainer(debug, "QList", events); +} QT_END_NAMESPACE static int verifyEvent(const QList &receivedEvents, const QJsonObject &event, -- cgit v1.2.3