diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-03 14:33:30 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-03 14:30:34 +0000 |
commit | 604e379338e7c9e17c929063148754a30077988c (patch) | |
tree | 72ba38c7174c3f801023e48734e21525039fbc28 /tests/auto/qml/qqmlconsole | |
parent | 29c7a1d566f9bbdcf3cadc270f4481e05a71eefb (diff) |
Improve logging of nested arrays
Nested arrays should be printed with nested '[' and ']', rather than
flattened.
[ChangeLog][QML] Nested arrays are not flattened anymore when printed
through console.log() and friends.
Change-Id: Ic27e58047fd78bc146e1179585fd0cb2c60a1144
Fixes: QTBUG-71931
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlconsole')
-rw-r--r-- | tests/auto/qml/qqmlconsole/data/logging.qml | 1 | ||||
-rw-r--r-- | tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlconsole/data/logging.qml b/tests/auto/qml/qqmlconsole/data/logging.qml index 8ed2dd73a1..1f929d311b 100644 --- a/tests/auto/qml/qqmlconsole/data/logging.qml +++ b/tests/auto/qml/qqmlconsole/data/logging.qml @@ -69,6 +69,7 @@ QtObject { console.log(contextStringListProperty); console.log(customObject); + console.log([[1,2,3,[2,2,2,2],4],[5,6,7,8]]); try { console.log(exception); diff --git a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp index f26eaa0817..b157314071 100644 --- a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp +++ b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp @@ -93,6 +93,7 @@ void tst_qqmlconsole::logging() QTest::ignoreMessage(QtDebugMsg, "1 [ping,pong] [object Object] 2"); QTest::ignoreMessage(QtDebugMsg, "[Hello,World]"); QTest::ignoreMessage(QtDebugMsg, "QVariant(CustomObject, MY OBJECT)"); + QTest::ignoreMessage(QtDebugMsg, "[[1,2,3,[2,2,2,2],4],[5,6,7,8]]"); QScopedPointer<QQmlContext> loggingContext(new QQmlContext(engine.rootContext())); QStringList stringList; stringList << QStringLiteral("Hello") << QStringLiteral("World"); |