diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-20 15:25:23 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-02-23 10:08:33 +0100 |
commit | c6528ce8c4f474a5e27d9d3e447d3e145af66ee2 (patch) | |
tree | e10976f0d4de387599c2c6ddd9a1a0063c6e7662 /tests/auto/qml/qqmlconsole | |
parent | 53f8d787052dd37cb71ed463445b4640cf394643 (diff) |
QtQml: Use correct logging category in console.trace()
Pick-to: 6.7
Fixes: QTBUG-108673
Change-Id: I5a267bbb52d9ba2d50ad63d29025eeae5796b093
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlconsole')
-rw-r--r-- | tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp index 88b9d4cc5c..4af76efa05 100644 --- a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp +++ b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp @@ -147,6 +147,15 @@ void tst_qqmlconsole::tracing() QQmlComponent component(&engine, testUrl); std::unique_ptr<QObject> object { component.create() }; QVERIFY(object.get() != nullptr); + + const QString traceText2 + = QLatin1String("qml: tracing (%1:%2)\nexpression for onCompleted (%1:%3)") + .arg(testUrl.toString()).arg(12).arg(16); + + QQmlTestMessageHandler messageHandler; + messageHandler.setIncludeCategoriesEnabled(true); + std::unique_ptr<QObject> object2 { component.create() }; + QCOMPARE(messageHandler.messageString(), traceText2); } void tst_qqmlconsole::profiling() |