diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-10-26 15:04:58 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-26 18:38:40 +0200 |
commit | b79ceabb43427ba73fb0d64bd24f46c44e6a9d8d (patch) | |
tree | c15e0907029d996cbee83735c3e5bd382ee2a6f9 /tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | |
parent | a927dc97844fd23e295387f8174367f3f4be2977 (diff) |
Readonly QML property support
Task-number: QTBUG-15257
Change-Id: I539b6e6a9e0e0172b68e8002aaa3f7c7e6648769
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 31aefd264e..c92dc809e9 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -169,7 +169,7 @@ private slots: void booleanConversion(); void handleReferenceManagement(); void stringArg(); - + void readonlyDeclaration(); void bug1(); void bug2(); void dynamicCreationCrash(); @@ -4036,6 +4036,18 @@ void tst_qdeclarativeecmascript::stringArg() delete object; } +void tst_qdeclarativeecmascript::readonlyDeclaration() +{ + QDeclarativeComponent component(&engine, TEST_FILE("readonlyDeclaration.qml")); + + QObject *object = component.create(); + QVERIFY(object != 0); + + QCOMPARE(object->property("test").toBool(), true); + + delete object; +} + // Test that assigning a null object works // Regressed with: df1788b4dbbb2826ae63f26bdf166342595343f4 void tst_qdeclarativeecmascript::nullObjectBinding() |