summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptvalue
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qscriptvalue')
-rw-r--r--tests/auto/qscriptvalue/qscriptvalue.pro2
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qscriptvalue/qscriptvalue.pro b/tests/auto/qscriptvalue/qscriptvalue.pro
index 98fd63d..9efde80 100644
--- a/tests/auto/qscriptvalue/qscriptvalue.pro
+++ b/tests/auto/qscriptvalue/qscriptvalue.pro
@@ -1,5 +1,5 @@
load(qttest_p4)
-QT += script
+QT = core gui script
SOURCES += tst_qscriptvalue.cpp
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 401161d..99f5770 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -2152,6 +2152,14 @@ void tst_QScriptValue::getSetScope()
QCOMPARE(object2.scope().strictlyEquals(object), true);
+ object.setProperty("foo", 123);
+ QVERIFY(!object2.property("foo").isValid());
+ {
+ QScriptValue ret = object2.property("foo", QScriptValue::ResolveScope);
+ QVERIFY(ret.isNumber());
+ QCOMPARE(ret.toInt32(), 123);
+ }
+
QScriptValue inv;
inv.setScope(object);
QCOMPARE(inv.scope().isValid(), false);