aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jsonobject.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-04-18 09:38:39 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-05-02 15:46:10 +0000
commit057e37dba9e06c70012ed36e5998880ac277c06f (patch)
treebb03e8ffcc3b909001884c9e151dc462252820b4 /src/qml/jsruntime/qv4jsonobject.cpp
parent1236abb3b3abab65984e32094bbaba4395667e0b (diff)
Fix console.log for sequence types such as QStringList
The output should be the same as if we were printing an array, with brackets. Task-number: QTBUG-67776 Change-Id: I942df66a2908f82ea8ba1ce65676413569cf6f02 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index c3569c29d2..7d2bb18ead 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -743,7 +743,7 @@ QString Stringify::Str(const QString &key, const Value &v)
o = value->asReturnedValue();
if (o) {
if (!o->as<FunctionObject>()) {
- if (o->as<ArrayObject>() || o->isListType()) {
+ if (o->isArrayLike()) {
return JA(o.getPointer());
} else {
return JO(o);