diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-24 07:03:42 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-24 07:04:27 (GMT) |
commit | 7eb5fc91a30a360507a65c19b6a3b96f757c2c4e (patch) | |
tree | 390b0010e1f7be48aeb8cf143d6ec1aaa1a80b7d /src/declarative/qml/qdeclarativeprivate.h | |
parent | 40256d682e1a552c9566a744a66cc6fe008b578b (diff) | |
download | Qt-7eb5fc91a30a360507a65c19b6a3b96f757c2c4e.zip Qt-7eb5fc91a30a360507a65c19b6a3b96f757c2c4e.tar.gz Qt-7eb5fc91a30a360507a65c19b6a3b96f757c2c4e.tar.bz2 |
Simplify QML element registration headers
Diffstat (limited to 'src/declarative/qml/qdeclarativeprivate.h')
-rw-r--r-- | src/declarative/qml/qdeclarativeprivate.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index c8a8c74..e8bbff4 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -43,10 +43,6 @@ #define QDECLARATIVEPRIVATE_H #include <QtCore/qglobal.h> - -#ifndef Q_OS_WIN -#include <stdint.h> -#endif #include <QtCore/qvariant.h> QT_BEGIN_HEADER @@ -57,9 +53,6 @@ QT_MODULE(Declarative) typedef QObject *(*QDeclarativeAttachedPropertiesFunc)(QObject *); -//template<typename T> -//struct qml_hasAttached { static bool const value = false; }; - template <typename TYPE> class QDeclarativeTypeInfo { @@ -70,11 +63,15 @@ public: }; +class QDeclarativeCustomParser; namespace QDeclarativePrivate { template<typename T> QObject *create() { return new T; } + template<typename T> + QObject *createParent(QObject *p) { return new T(p); } + template<class From, class To, int N> struct StaticCastSelectorClass { @@ -167,41 +164,44 @@ namespace QDeclarativePrivate return AttachedPropertySelector<T, has_attachedPropertiesMethod<T, has_attachedPropertiesMember<T>::value>::value>::metaObject(); } - struct MetaTypeIds { + struct RegisterType { + int version; + int typeId; int listId; - }; - typedef QObject *(*CreateFunc)(QObject *); + QObject *(*create)(); - template<typename T> - struct CreateParent { - static QObject *create(QObject *other) { - return new T(other); - } - }; + const char *uri; + int versionMajor; + int versionMinor; + const char *elementName; + const QMetaObject *metaObject; - template<typename T> - struct CreateNoParent { - static QObject *create() { - return new T; - } - }; + QDeclarativeAttachedPropertiesFunc attachedPropertiesFunction; + const QMetaObject *attachedPropertiesMetaObject; - struct Q_DECLARATIVE_EXPORT InstanceType { - InstanceType(int); - }; + int parserStatusCast; + int valueSourceCast; + int valueInterceptorCast; + + QObject *(*extensionObjectCreate)(QObject *); + const QMetaObject *extensionMetaObject; - template<typename T, int VMAJ, int VMIN> - struct Define { - static InstanceType instance; + QDeclarativeCustomParser *customParser; }; - - template<typename T> - struct ExtCreate { - static QObject *create(QObject *other) { - return new T(other); - } + + struct RegisterInterface { + int version; + + int typeId; + int listId; + + const char *iid; }; + + int Q_DECLARATIVE_EXPORT registerType(const RegisterType &); + int Q_DECLARATIVE_EXPORT registerType(const RegisterInterface &); + } QT_END_NAMESPACE |