aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-09 14:33:28 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-12 21:52:00 +0200
commita723c7ae756ba567c2f818bb77a83c24373d3438 (patch)
tree0508a1c1526e56a7aa3c4a3055c8a4b65a973b06 /tests/auto/qml/qqmlecmascript
parentbf22c55036f6429ccfc849ea71f33e757fae47fa (diff)
Use a ReturnedValue when converting to String or Object
Also rename Value::toQString() to Value::toQStringNoThrow(), and add a throwing toQString() method for JS use. Change-Id: I821b33fc61abb7d08839df965fd337685f61a545 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 5e1f83a43a..b9ef6d0910 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -2445,7 +2445,7 @@ void tst_qqmlecmascript::callQtInvokables()
{
QV4::Value ret = EVALUATE("object.method_NoArgs_QScriptValue()");
QVERIFY(ret.isString());
- QCOMPARE(ret.toQString(), QString("Hello world"));
+ QCOMPARE(ret.toQStringNoThrow(), QString("Hello world"));
QCOMPARE(o->error(), false);
QCOMPARE(o->invoked(), 6);
QCOMPARE(o->actuals().count(), 0);