aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlconsole/data
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-06-05 13:34:40 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-28 14:05:28 +0200
commitcc878137fcf984eb1d6ecec74d4b807e49874d8b (patch)
tree25b51c0056cb7b41ed95898effa2892beccda6fa /tests/auto/qml/qqmlconsole/data
parentb94b5531b0684965a205d6b0ec744c3482de3940 (diff)
Console API: Print JS object
Calling console.log(), console.debug(), print() etc would only print out "Object" if a JS Object was passed as an argument. This patch calls the toString() on the object. Change-Id: Iadf8b4d1fe81c3e2c7bd65e3c153a930fd994bef Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlconsole/data')
-rw-r--r--tests/auto/qml/qqmlconsole/data/logging.qml1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlconsole/data/logging.qml b/tests/auto/qml/qqmlconsole/data/logging.qml
index 44009b5db9..11f11f492c 100644
--- a/tests/auto/qml/qqmlconsole/data/logging.qml
+++ b/tests/auto/qml/qqmlconsole/data/logging.qml
@@ -62,6 +62,7 @@ QtObject {
var a = [1, 2];
var b = {a: "hello", d: 1 };
+ b.toString = function() { return JSON.stringify(b) }
var c
var d = 12;
var e = function() { return 5;};