diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-20 02:40:08 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-20 02:40:08 (GMT) |
commit | f31f7ee8e966f1ccb954c0bca614f5c5605c820f (patch) | |
tree | c6a60aa9df1aa6beff3a83d3f352578092604685 /tests/auto/declarative/qdeclarativelanguage | |
parent | dc6414e75e2882dc0d23994ec8c5923906d8f08e (diff) | |
download | Qt-f31f7ee8e966f1ccb954c0bca614f5c5605c820f.zip Qt-f31f7ee8e966f1ccb954c0bca614f5c5605c820f.tar.gz Qt-f31f7ee8e966f1ccb954c0bca614f5c5605c820f.tar.bz2 |
Improve error messages, especially on embedded.
With embedded, it is often the case that some QT_NO_* features are
turned off (eg. QT_NO_XMLPATTERNS), which in turn leads to QML types not
being available.
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage')
4 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt new file mode 100644 index 0000000..23cd3f3 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt @@ -0,0 +1 @@ +3:1:Keys is only available via attached properties diff --git a/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml new file mode 100644 index 0000000..0612fa2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml @@ -0,0 +1,4 @@ +import Qt 4.6 + +Keys { +} diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp index 623775a..5d87404 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp @@ -52,8 +52,7 @@ void registerTypes() qmlRegisterType<MyNamespace::MySecondNamespacedType>("Test",1,0,"MySecondNamespacedType"); qmlRegisterType<MyGroupedObject>(); - qmlRegisterCustomType<MyCustomParserType>("Test", 1, 0, "MyCustomParserType", "MyCustomParserType", - new MyCustomParserTypeParser); + qmlRegisterCustomType<MyCustomParserType>("Test", 1, 0, "MyCustomParserType", new MyCustomParserTypeParser); } QVariant myCustomVariantTypeConverter(const QString &data) diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 07fbf83..3d56d1f 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -330,6 +330,7 @@ void tst_qdeclarativelanguage::errors_data() QTest::newRow("missingValueTypeProperty") << "missingValueTypeProperty.qml" << "missingValueTypeProperty.errors.txt" << false; QTest::newRow("objectValueTypeProperty") << "objectValueTypeProperty.qml" << "objectValueTypeProperty.errors.txt" << false; QTest::newRow("enumTypes") << "enumTypes.qml" << "enumTypes.errors.txt" << false; + QTest::newRow("noCreation") << "noCreation.qml" << "noCreation.errors.txt" << false; QTest::newRow("destroyedSignal") << "destroyedSignal.qml" << "destroyedSignal.errors.txt" << false; } |