diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-26 09:43:33 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-26 09:51:56 +0200 |
commit | e9e6f70d355499d551a26960d236644f92ea38af (patch) | |
tree | 542840d4b3b8ff82d6fab38c9ad2615d3592b793 /tests/auto/qml/qqmllanguage | |
parent | 916ced089f37d96ca8ef1cdb938791247bd44b72 (diff) | |
parent | eadc35f499edd25d5d1c5f803db1d61675c1cc2c (diff) |
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
src/qml/qml/qqmlobjectcreator_p.h
Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
Diffstat (limited to 'tests/auto/qml/qqmllanguage')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/earlyIdObjectAccess.qml | 23 | ||||
-rw-r--r-- | tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 10 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/earlyIdObjectAccess.qml b/tests/auto/qml/qqmllanguage/data/earlyIdObjectAccess.qml new file mode 100644 index 0000000000..22c335b1a7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/earlyIdObjectAccess.qml @@ -0,0 +1,23 @@ +import QtQuick 2.0 + +Item { + visible: false + property bool success: false + property bool loading: true + + Item { + visible: someOtherItem.someProperty + onVisibleChanged: { + if (!visible) { + success = loading + } + } + } + + Item { + id: someOtherItem + property bool someProperty: true + } + + Component.onCompleted: loading = false +} diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index d6d1cef36b..363dd0244e 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -234,6 +234,8 @@ private slots: void noChildEvents(); + void earlyIdObjectAccess(); + private: QQmlEngine engine; QStringList defaultImportPathList; @@ -3888,6 +3890,14 @@ void tst_qqmllanguage::noChildEvents() QCOMPARE(object->childAddedEventCount(), 0); } +void tst_qqmllanguage::earlyIdObjectAccess() +{ + QQmlComponent component(&engine, testFileUrl("earlyIdObjectAccess.qml")); + QScopedPointer<QObject> o(component.create()); + QVERIFY(!o.isNull()); + QVERIFY(o->property("success").toBool()); +} + QTEST_MAIN(tst_qqmllanguage) #include "tst_qqmllanguage.moc" |