diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-15 04:13:53 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-15 04:13:53 (GMT) |
commit | 272c26b6daf3e48c3f338f4c78cc9e694ac7993f (patch) | |
tree | 06941c3154d7eaf98f906b7b9c46ec1d3eb8a83f | |
parent | 214b89c2e754c389433ae28889520647b198007d (diff) | |
parent | b443a7b302c2e87920ee62370a1f6bd828d23192 (diff) | |
download | Qt-272c26b6daf3e48c3f338f4c78cc9e694ac7993f.zip Qt-272c26b6daf3e48c3f338f4c78cc9e694ac7993f.tar.gz Qt-272c26b6daf3e48c3f338f4c78cc9e694ac7993f.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
3 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.1.txt b/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.1.txt new file mode 100644 index 0000000..2687465 --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.1.txt @@ -0,0 +1,10 @@ +MyQmlObject { + objectProperty: if(1) OtherObject + + property var obj + + obj: Object { + id: OtherObject + } +} + diff --git a/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.txt b/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.txt new file mode 100644 index 0000000..4aa20ae --- /dev/null +++ b/tests/auto/declarative/qmlbindengine/idShortcutInvalidates.txt @@ -0,0 +1,9 @@ +MyQmlObject { + objectProperty: OtherObject + + property var obj + + obj: Object { + id: OtherObject + } +} diff --git a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp index dd82d4f..a0554f3 100644 --- a/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp +++ b/tests/auto/declarative/qmlbindengine/tst_qmlbindengine.cpp @@ -15,6 +15,7 @@ public: tst_qmlbindengine() {} private slots: + void idShortcutInvalidates(); void boolPropertiesEvaluateAsBool(); void methods(); void signalAssignment(); @@ -29,6 +30,27 @@ private: QmlEngine engine; }; +void tst_qmlbindengine::idShortcutInvalidates() +{ + { + QmlComponent component(&engine, TEST_FILE("idShortcutInvalidates.txt")); + MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); + QVERIFY(object != 0); + QVERIFY(object->objectProperty() != 0); + delete object->objectProperty(); + QVERIFY(object->objectProperty() == 0); + } + + { + QmlComponent component(&engine, TEST_FILE("idShortcutInvalidates.1.txt")); + MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); + QVERIFY(object != 0); + QVERIFY(object->objectProperty() != 0); + delete object->objectProperty(); + QVERIFY(object->objectProperty() == 0); + } +} + void tst_qmlbindengine::boolPropertiesEvaluateAsBool() { { |