From ba3ee12e8b7c73084ecfe8e045e4ca361df960d3 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 9 Oct 2009 10:33:39 +1000 Subject: More QML type registration on Symbian. --- src/declarative/qml/qmlcustomparser_p.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h index 5be0680..eb3e579 100644 --- a/src/declarative/qml/qmlcustomparser_p.h +++ b/src/declarative/qml/qmlcustomparser_p.h @@ -127,8 +127,14 @@ protected: private: QList exceptions; }; -#define QML_DEFINE_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, NAME, TYPE, CUSTOMTYPE) \ + +#if defined(Q_OS_SYMBIAN) +# define QML_DEFINE_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, NAME, TYPE, CUSTOMTYPE) \ + static int defineCustomType##NAME = qmlRegisterCustomType(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, #NAME, #TYPE, new CUSTOMTYPE); +#else +# define QML_DEFINE_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, NAME, TYPE, CUSTOMTYPE) \ template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterCustomType(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, #NAME, #TYPE, new CUSTOMTYPE)); +#endif QT_END_NAMESPACE -- cgit v0.12