diff options
author | Alan Alpert <aalpert@rim.com> | 2012-12-03 08:50:11 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-05 19:21:01 +0100 |
commit | 9995a2910d8a5f0317fe3adeb54f838b99ab31a8 (patch) | |
tree | d35ae22a28bed65d143e5a8920d3024c0cc164c8 /src/declarative/qml/qdeclarativeprivate.h | |
parent | dc96bfd00152e25f007511f64bff7c413f657886 (diff) |
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 <chris.adams@jollamobile.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativeprivate.h')
-rw-r--r-- | src/declarative/qml/qdeclarativeprivate.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index db2b0661..b88ff79f 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -233,10 +233,19 @@ namespace QDeclarativePrivate AutoParentFunction function; }; + struct RegisterComponent { + const QUrl &url; + const char *uri; + const char *typeName; + int majorVersion; + int minorVersion; + }; + enum RegistrationType { TypeRegistration = 0, InterfaceRegistration = 1, - AutoParentRegistration = 2 + AutoParentRegistration = 2, + ComponentRegistration = 3 }; int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *); |