diff options
author | Liang Qi <liang.qi@qt.io> | 2016-05-19 13:04:54 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-05-19 20:41:34 +0200 |
commit | 63ec33e79cf86c4312c58bea12a2aab400890c70 (patch) | |
tree | 5c9b5cd51276ea0a3ca42567666a09e70efa11cc /tests/auto/qml/qqmlcontext | |
parent | b9e4a4df577959579b2322fb6077bde82d9ffce3 (diff) | |
parent | afc84775efdc6e13e2e210bb94e115b378d90134 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4engine_p.h
Change-Id: I89ffccd699bee675732758d039e22224b275d60d
Diffstat (limited to 'tests/auto/qml/qqmlcontext')
-rw-r--r-- | tests/auto/qml/qqmlcontext/data/qtbug_53431.qml | 7 | ||||
-rw-r--r-- | tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml b/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml new file mode 100644 index 0000000000..2ceee2bade --- /dev/null +++ b/tests/auto/qml/qqmlcontext/data/qtbug_53431.qml @@ -0,0 +1,7 @@ +import QtQml 2.0 +QtObject { + property int value: { + console.log("lookup in global object") + return 1 + } +} diff --git a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp index edbf0869e8..e0cde6c86f 100644 --- a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp +++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp @@ -56,6 +56,7 @@ private slots: void refreshExpressions(); void refreshExpressionsCrash(); void refreshExpressionsRootContext(); + void skipExpressionRefresh_qtbug_53431(); void qtbug_22535(); void evalAfterInvalidate(); @@ -637,6 +638,19 @@ void tst_qqmlcontext::refreshExpressionsRootContext() delete o1; } +void tst_qqmlcontext::skipExpressionRefresh_qtbug_53431() +{ + QQmlEngine engine; + QQmlComponent component(&engine, testFileUrl("qtbug_53431.qml")); + QScopedPointer<QObject> object(component.create(0)); + QVERIFY(!object.isNull()); + QCOMPARE(object->property("value").toInt(), 1); + object->setProperty("value", 10); + QCOMPARE(object->property("value").toInt(), 10); + engine.rootContext()->setContextProperty("randomContextProperty", 42); + QCOMPARE(object->property("value").toInt(), 10); +} + void tst_qqmlcontext::qtbug_22535() { QQmlEngine engine; |