From 057e37dba9e06c70012ed36e5998880ac277c06f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 18 Apr 2018 09:38:39 +0200 Subject: 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 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4jsonobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4jsonobject.cpp') 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()) { - if (o->as() || o->isListType()) { + if (o->isArrayLike()) { return JA(o.getPointer()); } else { return JO(o); -- cgit v1.2.3