From 75ebbd0b354739150e10da7216b44e2dde2c2b14 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 20 Dec 2018 14:08:12 +0100 Subject: Quote stringified generic variants on JSON.stringify A string representation of those is unlikely to be actual JSON, and even if it is, we don't want to use it as such. Fixes: QTBUG-72674 Change-Id: I6815366a0176d9725ff4840d3fc545792ce00535 Reviewed-by: Simon Hausmann Reviewed-by: Robin Burchell --- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/auto/qml/qqmlecmascript') diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 254a6bc878..085cd5ffd0 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -8464,7 +8464,8 @@ void tst_qqmlecmascript::stringify_qtbug_50592() QScopedPointer obj(component.create()); QVERIFY(obj != nullptr); - QCOMPARE(obj->property("source").toString(), QString::fromLatin1("http://example.org/some_nonexistant_image.png")); + QCOMPARE(obj->property("source").toString(), + QString::fromLatin1("\"http://example.org/some_nonexistant_image.png\"")); } // Tests for the JS-only instanceof. Tests for the QML extensions for -- cgit v1.2.3