diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-10-09 00:30:39 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-10-09 00:30:39 (GMT) |
commit | 8d8089299507bbb4edbb94f21e29032a46bccc0a (patch) | |
tree | feaf6069052004e89d2635f4f0787597f91524fc /src/declarative/qml/qml.h | |
parent | 14786157ac329f97812ad337f506b129be0796f4 (diff) | |
download | Qt-8d8089299507bbb4edbb94f21e29032a46bccc0a.zip Qt-8d8089299507bbb4edbb94f21e29032a46bccc0a.tar.gz Qt-8d8089299507bbb4edbb94f21e29032a46bccc0a.tar.bz2 |
Make QML type registration work on Symbian
Diffstat (limited to 'src/declarative/qml/qml.h')
-rw-r--r-- | src/declarative/qml/qml.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/declarative/qml/qml.h b/src/declarative/qml/qml.h index 23f2f1e..c437ef1 100644 --- a/src/declarative/qml/qml.h +++ b/src/declarative/qml/qml.h @@ -74,6 +74,24 @@ QT_MODULE(Declarative) QT_BEGIN_NAMESPACE +#if defined(Q_OS_SYMBIAN) +#define QML_DEFINE_INTERFACE(INTERFACE) \ + static int defineInterface##INTERFACE = qmlRegisterInterface<INTERFACE>(#INTERFACE); + +#define QML_DEFINE_EXTENDED_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, NAME, TYPE, EXTENSION) \ + static int registerExtended##TYPE = qmlRegisterExtendedType<TYPE,EXTENSION>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE); + +#define QML_DEFINE_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, NAME, TYPE) \ + static int defineType##TYPE = qmlRegisterType<TYPE>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE); + +#define QML_DEFINE_EXTENDED_NOCREATE_TYPE(TYPE, EXTENSION) \ + static int registerExtendedNoCreate##TYPE = qmlRegisterExtendedType<TYPE,EXTENSION>(#TYPE); + +#define QML_DEFINE_NOCREATE_TYPE(TYPE) \ + static int registerNoCreate##TYPE = qmlRegisterType<TYPE>(#TYPE); + +#else + #define QML_DEFINE_INTERFACE(INTERFACE) \ template<> QmlPrivate::InstanceType QmlPrivate::Define<INTERFACE *,0,0,0>::instance(qmlRegisterInterface<INTERFACE>(#INTERFACE)); @@ -89,6 +107,8 @@ QT_BEGIN_NAMESPACE #define QML_DEFINE_NOCREATE_TYPE(TYPE) \ template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *,0,0,0>::instance(qmlRegisterType<TYPE>(#TYPE)); +#endif + class QmlContext; class QmlEngine; Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *); |