diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-26 06:39:12 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-26 06:39:12 (GMT) |
commit | 6fb3a8884701b3a08607d0d8ec2e67fabf56d468 (patch) | |
tree | 334cc85e7565fedfddb73357dcdbe22a37f42cf3 /tests | |
parent | 3aff93a5bba79bdf45f13e4c9f8c66c9a9ed47b4 (diff) | |
download | Qt-6fb3a8884701b3a08607d0d8ec2e67fabf56d468.zip Qt-6fb3a8884701b3a08607d0d8ec2e67fabf56d468.tar.gz Qt-6fb3a8884701b3a08607d0d8ec2e67fabf56d468.tar.bz2 |
Remove AssignObject instruction
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlparser/assignObjectToVariant.txt | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qmlparser/tst_qmlparser.cpp | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlparser/assignObjectToVariant.txt b/tests/auto/declarative/qmlparser/assignObjectToVariant.txt new file mode 100644 index 0000000..180221d --- /dev/null +++ b/tests/auto/declarative/qmlparser/assignObjectToVariant.txt @@ -0,0 +1,4 @@ +Object { + property var a; + a: MyQmlObject {} +} diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index 0852d35..cdc2a72 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -26,6 +26,7 @@ private slots: void interfaceQmlList(); void interfaceQList(); void assignObjectToSignal(); + void assignObjectToVariant(); void assignLiteralSignalProperty(); void assignQmlComponent(); void assignBasicTypes(); @@ -208,6 +209,15 @@ void tst_qmlparser::assignObjectToSignal() emit object->basicSignal(); } +void tst_qmlparser::assignObjectToVariant() +{ + QmlComponent component(&engine, TEST_FILE("assignObjectToVariant.txt")); + QObject *object = component.create(); + QVERIFY(object != 0); + QVariant v = object->property("a"); + QVERIFY(v.userType() == qMetaTypeId<QObject *>()); +} + void tst_qmlparser::assignLiteralSignalProperty() { QmlComponent component(&engine, TEST_FILE("assignLiteralSignalProperty.txt")); |