diff options
Diffstat (limited to 'src/declarative/util/qdeclarativeutilmodule.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativeutilmodule.cpp | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp index d4c72bd..b9f1abb 100644 --- a/src/declarative/util/qdeclarativeutilmodule.cpp +++ b/src/declarative/util/qdeclarativeutilmodule.cpp @@ -46,6 +46,7 @@ #include "private/qdeclarativebind_p.h" #include "private/qdeclarativeconnections_p.h" #include "private/qdeclarativesmoothedanimation_p.h" +#include "private/qdeclarativesmoothedfollow_p.h" #include "private/qdeclarativefontloader_p.h" #include "private/qdeclarativelistaccessor_p.h" #include "private/qdeclarativelistmodel_p.h" @@ -71,38 +72,6 @@ #include "private/qdeclarativexmllistmodel_p.h" #endif -template<typename T> -int qmlRegisterTypeEnums(const char *qmlName) -{ - QByteArray name(T::staticMetaObject.className()); - - QByteArray pointerName(name + '*'); - QByteArray listName("QDeclarativeListProperty<" + name + ">"); - - QDeclarativePrivate::RegisterType type = { - 0, - - qRegisterMetaType<T *>(pointerName.constData()), - qRegisterMetaType<QDeclarativeListProperty<T> >(listName.constData()), - 0, 0, - - "Qt", 4, 6, qmlName, &T::staticMetaObject, - - QDeclarativePrivate::attachedPropertiesFunc<T>(), - QDeclarativePrivate::attachedPropertiesMetaObject<T>(), - - QDeclarativePrivate::StaticCastSelector<T,QDeclarativeParserStatus>::cast(), - QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueSource>::cast(), - QDeclarativePrivate::StaticCastSelector<T,QDeclarativePropertyValueInterceptor>::cast(), - - 0, 0, - - 0 - }; - - return QDeclarativePrivate::registerType(type); -} - void QDeclarativeUtilModule::defineModule() { qmlRegisterType<QDeclarativeAnchorAnimation>("Qt",4,6,"AnchorAnimation"); @@ -112,6 +81,7 @@ void QDeclarativeUtilModule::defineModule() qmlRegisterType<QDeclarativeColorAnimation>("Qt",4,6,"ColorAnimation"); qmlRegisterType<QDeclarativeConnections>("Qt",4,6,"Connections"); qmlRegisterType<QDeclarativeSmoothedAnimation>("Qt",4,6,"SmoothedAnimation"); + qmlRegisterType<QDeclarativeSmoothedFollow>("Qt",4,6,"SmoothedFollow"); qmlRegisterType<QDeclarativeFontLoader>("Qt",4,6,"FontLoader"); qmlRegisterType<QDeclarativeListElement>("Qt",4,6,"ListElement"); qmlRegisterType<QDeclarativeNumberAnimation>("Qt",4,6,"NumberAnimation"); @@ -142,7 +112,7 @@ void QDeclarativeUtilModule::defineModule() qmlRegisterType<QDeclarativeStateOperation>(); qmlRegisterType<QDeclarativeAnchorSet>(); - qmlRegisterTypeEnums<QDeclarativeAbstractAnimation>("Animation"); + qmlRegisterUncreatableType<QDeclarativeAbstractAnimation>("Qt",4,6,"Animation"); qmlRegisterCustomType<QDeclarativeListModel>("Qt", 4,6, "ListModel", "QDeclarativeListModel", new QDeclarativeListModelParser); |