From 9995a2910d8a5f0317fe3adeb54f838b99ab31a8 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 3 Dec 2012 08:50:11 -0800 Subject: Add a method that allows registration of files to types There is currently no way in C++ to duplicate the functionality of a qmldir file in mapping QML files to versioned types in a module. This functionality would be useful both in cases where a separate qmldir file would be overkill, and for cases where the type mapping should be generated dynamically. Change-Id: I28d7898122c5556fcd7cf3476795bcf4bb288eab Reviewed-by: Christopher Adams --- tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml | 5 +++++ .../auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml (limited to 'tests/auto/declarative/qdeclarativelanguage/data') diff --git a/tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml b/tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml new file mode 100644 index 00000000..9ba0d612 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/MyComponentType.qml @@ -0,0 +1,5 @@ +import QtQuick 1.0 + +Item { + property int test: 11 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml new file mode 100644 index 00000000..532bc319 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlComponentType.qml @@ -0,0 +1,4 @@ +import QtQuick 1.0 +import Test 1.0 + +MyComponentType {} -- cgit v1.2.3