diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-11-04 03:03:07 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-11-04 03:03:07 (GMT) |
commit | c82f6af6055fe601a8671928bb4cb6f28b05605c (patch) | |
tree | 79e3014f820c9f3249dbcdb5bf688fef529e99d8 | |
parent | f1344a817fdb3d263bd64f4440fedc73ad94ad31 (diff) | |
parent | 59d4e2022095d8363cd5373a1a74f86a448c3542 (diff) | |
download | Qt-c82f6af6055fe601a8671928bb4cb6f28b05605c.zip Qt-c82f6af6055fe601a8671928bb4cb6f28b05605c.tar.gz Qt-c82f6af6055fe601a8671928bb4cb6f28b05605c.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
3 files changed, 32 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml b/tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml index b4a702b..07bb16b 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/ConstantsOverrideBindings.qml @@ -3,4 +3,10 @@ import Qt.test 1.0 MyQmlObject { property int c1: 0 property int c2: c1 + property alias c3: inner.ic1 + + objectProperty: MyQmlObject { + id: inner + property int ic1: c1 + } } diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.4.qml new file mode 100644 index 0000000..5a2091f --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/constantsOverrideBindings.4.qml @@ -0,0 +1,11 @@ +import Qt.test 1.0 + +MyQmlObject { + property alias c1: myConstants.c1 + property alias c3: myConstants.c3 + + objectProperty: ConstantsOverrideBindings { + id: myConstants + c3: 10 + } +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 72e2e10..3dd69da 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -733,6 +733,21 @@ void tst_qdeclarativeecmascript::constantsOverrideBindings() QCOMPARE(object->property("c2").toInt(), 13); } #endif + + // Using an alias + { + QDeclarativeComponent component(&engine, TEST_FILE("constantsOverrideBindings.4.qml")); + MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->property("c1").toInt(), 0); + QEXPECT_FAIL("", "QTBUG-13719", Continue); + QCOMPARE(object->property("c3").toInt(), 10); + object->setProperty("c1", QVariant(9)); + QCOMPARE(object->property("c1").toInt(), 9); + QEXPECT_FAIL("", "QTBUG-13719", Continue); + QCOMPARE(object->property("c3").toInt(), 10); + } } /* |