aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-07 12:06:14 +0200
committerLiang Qi <liang.qi@qt.io>2017-06-07 12:06:15 +0200
commit55490690f81eba168b06a90e4a66cefc20b38252 (patch)
tree9c6b6b9234aa767af1c69cac4d4cf896f292be20 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
parent5624e82d068ebab254239121810fc097af7fcb40 (diff)
parentd8f84e5769632544dfac5138348481330c4da4cd (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 07ae9821e9..45f312e934 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -341,6 +341,7 @@ private slots:
void redefineGlobalProp();
void freeze_empty_object();
void singleBlockLoops();
+ void qtbug_60547();
private:
// static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -8358,6 +8359,16 @@ void tst_qqmlecmascript::singleBlockLoops()
QVERIFY(!component.isError());
}
+// 'counter' was incorrectly resolved as a type rather than a variable.
+// This fix ensures it looks up the right thing.
+void tst_qqmlecmascript::qtbug_60547()
+{
+ QQmlComponent component(&engine, testFileUrl("qtbug60547/main.qml"));
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY2(!object.isNull(), qPrintable(component.errorString()));
+ QCOMPARE(object->property("counter"), QVariant(int(1)));
+}
+
QTEST_MAIN(tst_qqmlecmascript)
#include "tst_qqmlecmascript.moc"