summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcustomparser_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-10-09 00:33:39 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-10-09 00:33:39 (GMT)
commitba3ee12e8b7c73084ecfe8e045e4ca361df960d3 (patch)
treeae3346a64dc8d9815b1467581134f74baa3be7a0 /src/declarative/qml/qmlcustomparser_p.h
parent8d8089299507bbb4edbb94f21e29032a46bccc0a (diff)
downloadQt-ba3ee12e8b7c73084ecfe8e045e4ca361df960d3.zip
Qt-ba3ee12e8b7c73084ecfe8e045e4ca361df960d3.tar.gz
Qt-ba3ee12e8b7c73084ecfe8e045e4ca361df960d3.tar.bz2
More QML type registration on Symbian.
Diffstat (limited to 'src/declarative/qml/qmlcustomparser_p.h')
-rw-r--r--src/declarative/qml/qmlcustomparser_p.h8
1 files changed, 7 insertions, 1 deletions
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<QmlError> 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<TYPE>(#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<TYPE *,(VERSION_MAJ), (VERSION_MIN_FROM), (VERSION_MAJ_TO)>::instance(qmlRegisterCustomType<TYPE>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, #NAME, #TYPE, new CUSTOMTYPE));
+#endif
QT_END_NAMESPACE