diff options
author | Alan Alpert <aalpert@rim.com> | 2013-01-24 12:13:57 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-18 19:46:02 +0100 |
commit | 99ad368cf810723643ae76bba6a1adba3321b18f (patch) | |
tree | e87c708650931c8863a1affed20befd1578aff35 /tests/auto/qml/qqmllanguage/data | |
parent | d0491c87a9f0f2dadc9ef0e0a267b8c241c08b41 (diff) |
Add qmlRegisterType for Composite Types
This is equivalent functionality to registering a composite type in a
qmldir file, a type name in a versioned module is associated with a
given file. This function now allows that to be done easily from C++.
Change-Id: I1cf44b92c3ad7fee593f4f84773c35b56253e628
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
5 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.1.errors.txt b/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.1.errors.txt new file mode 100644 index 0000000000..7a75447a62 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.1.errors.txt @@ -0,0 +1,2 @@ +3:1:Type RegisteredCompositeType2 unavailable +-1:-1:File not found diff --git a/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.1.qml b/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.1.qml new file mode 100644 index 0000000000..915a6138d9 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.1.qml @@ -0,0 +1,3 @@ +import Test 1.0 + +RegisteredCompositeType2 {} diff --git a/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.2.errors.txt b/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.2.errors.txt new file mode 100644 index 0000000000..0272619404 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.2.errors.txt @@ -0,0 +1,2 @@ +3:1:Type RegisteredCompositeType3 unavailable +1:1:Expected a qualified name id diff --git a/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.2.qml b/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.2.qml new file mode 100644 index 0000000000..43d7f3ee95 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/badCompositeRegistration.2.qml @@ -0,0 +1,3 @@ +import Test 1.0 + +RegisteredCompositeType3 {} diff --git a/tests/auto/qml/qqmllanguage/data/registeredCompositeType.qml b/tests/auto/qml/qqmllanguage/data/registeredCompositeType.qml new file mode 100644 index 0000000000..f633a14fa7 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/registeredCompositeType.qml @@ -0,0 +1,3 @@ +import Test 1.0 + +RegisteredCompositeType {} |