diff options
Diffstat (limited to 'tests/auto/declarative/qmllanguage')
-rw-r--r-- | tests/auto/declarative/qmllanguage/testtypes.cpp | 1 | ||||
-rw-r--r-- | tests/auto/declarative/qmllanguage/testtypes.h | 12 | ||||
-rw-r--r-- | tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp | 21 |
3 files changed, 29 insertions, 5 deletions
diff --git a/tests/auto/declarative/qmllanguage/testtypes.cpp b/tests/auto/declarative/qmllanguage/testtypes.cpp index c370c09..933431d 100644 --- a/tests/auto/declarative/qmllanguage/testtypes.cpp +++ b/tests/auto/declarative/qmllanguage/testtypes.cpp @@ -47,4 +47,5 @@ QML_DEFINE_TYPE(Test,1,0,MyContainer,MyContainer); QML_DEFINE_TYPE(Test,1,0,MyPropertyValueSource,MyPropertyValueSource); QML_DEFINE_TYPE(Test,1,0,MyDotPropertyObject,MyDotPropertyObject); QML_DEFINE_TYPE(Test,1,0,MyNamespacedType,MyNamespace::MyNamespacedType); +QML_DEFINE_TYPE(Test,1,0,MySecondNamespacedType,MyNamespace::MySecondNamespacedType); QML_DEFINE_NOCREATE_TYPE(MyGroupedObject); diff --git a/tests/auto/declarative/qmllanguage/testtypes.h b/tests/auto/declarative/qmllanguage/testtypes.h index b251f87..3598d68 100644 --- a/tests/auto/declarative/qmllanguage/testtypes.h +++ b/tests/auto/declarative/qmllanguage/testtypes.h @@ -535,7 +535,19 @@ namespace MyNamespace { { Q_OBJECT }; + + class MySecondNamespacedType : public QObject + { + Q_OBJECT + Q_PROPERTY(QmlList<MyNamespace::MyNamespacedType *> *list READ list); + public: + QmlList<MyNamespacedType *> *list() { return &m_list; } + + private: + QmlConcreteList<MyNamespacedType *> m_list; + }; } QML_DECLARE_TYPE(MyNamespace::MyNamespacedType); +QML_DECLARE_TYPE(MyNamespace::MySecondNamespacedType); #endif // TESTTYPES_H diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index a05ee06..d5c5c4d 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -693,11 +693,22 @@ void tst_qmllanguage::valueTypes() void tst_qmllanguage::cppnamespace() { - QmlComponent component(&engine, TEST_FILE("cppnamespace.qml")); - VERIFY_ERRORS(0); - QObject *object = component.create(); - QVERIFY(object != 0); - delete object; + { + QmlComponent component(&engine, TEST_FILE("cppnamespace.qml")); + VERIFY_ERRORS(0); + QObject *object = component.create(); + QVERIFY(object != 0); + delete object; + } + + { + QmlComponent component(&engine, TEST_FILE("cppnamespace.2.qml")); + qWarning() << component.errors(); + VERIFY_ERRORS(0); + QObject *object = component.create(); + QVERIFY(object != 0); + delete object; + } } void tst_qmllanguage::aliasProperties() |