summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelanguage
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-04-20 02:40:08 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-04-20 02:40:08 (GMT)
commitf31f7ee8e966f1ccb954c0bca614f5c5605c820f (patch)
treec6a60aa9df1aa6beff3a83d3f352578092604685 /tests/auto/declarative/qdeclarativelanguage
parentdc6414e75e2882dc0d23994ec8c5923906d8f08e (diff)
downloadQt-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')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/noCreation.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp1
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;
}