diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-07-22 08:00:16 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-07-22 08:00:16 (GMT) |
commit | d32adfd34f5cd2334b4041dfc0c07a5538ccdff7 (patch) | |
tree | 1c694ebd45377baf633e0e8091ae40c35b537c1e /src/declarative/qml/qdeclarativeprivate.h | |
parent | 75aabee03791804772c4fe934630a27f7c2c9ae5 (diff) | |
download | Qt-d32adfd34f5cd2334b4041dfc0c07a5538ccdff7.zip Qt-d32adfd34f5cd2334b4041dfc0c07a5538ccdff7.tar.gz Qt-d32adfd34f5cd2334b4041dfc0c07a5538ccdff7.tar.bz2 |
Generalize qml "registration"
While it is difficult to predict the future, the hope is that this might
give us a little more flexibility when it comes to fixing bugs etc. in
patch releases.
Diffstat (limited to 'src/declarative/qml/qdeclarativeprivate.h')
-rw-r--r-- | src/declarative/qml/qdeclarativeprivate.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index cd859fe..b2d7451 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -42,6 +42,17 @@ #ifndef QDECLARATIVEPRIVATE_H #define QDECLARATIVEPRIVATE_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #include <QtCore/qglobal.h> #include <QtCore/qvariant.h> #ifndef Q_OS_WIN @@ -177,6 +188,9 @@ namespace QDeclarativePrivate return AttachedPropertySelector<T, has_attachedPropertiesMethod<T, has_attachedPropertiesMember<T>::value>::value>::metaObject(); } + enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent }; + typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent); + struct RegisterType { int version; @@ -214,13 +228,19 @@ namespace QDeclarativePrivate const char *iid; }; - enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent }; - typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent); + struct RegisterAutoParent { + int version; - int Q_DECLARATIVE_EXPORT registerAutoParentFunction(AutoParentFunction); - int Q_DECLARATIVE_EXPORT registerType(const RegisterType &); - int Q_DECLARATIVE_EXPORT registerType(const RegisterInterface &); + AutoParentFunction function; + }; + + enum RegistrationType { + TypeRegistration = 0, + InterfaceRegistration = 1, + AutoParentRegistration = 2 + }; + int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *); } QT_END_NAMESPACE |