diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-20 02:40:08 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-20 02:40:08 (GMT) |
commit | f31f7ee8e966f1ccb954c0bca614f5c5605c820f (patch) | |
tree | c6a60aa9df1aa6beff3a83d3f352578092604685 /src/declarative/util/qdeclarativeutilmodule.cpp | |
parent | dc6414e75e2882dc0d23994ec8c5923906d8f08e (diff) | |
download | Qt-f31f7ee8e966f1ccb954c0bca614f5c5605c820f.zip Qt-f31f7ee8e966f1ccb954c0bca614f5c5605c820f.tar.gz Qt-f31f7ee8e966f1ccb954c0bca614f5c5605c820f.tar.bz2 |
Improve error messages, especially on embedded.
With embedded, it is often the case that some QT_NO_* features are
turned off (eg. QT_NO_XMLPATTERNS), which in turn leads to QML types not
being available.
Diffstat (limited to 'src/declarative/util/qdeclarativeutilmodule.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativeutilmodule.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp index b9f1abb..ee72423 100644 --- a/src/declarative/util/qdeclarativeutilmodule.cpp +++ b/src/declarative/util/qdeclarativeutilmodule.cpp @@ -68,6 +68,8 @@ #include "private/qdeclarativetransitionmanager_p_p.h" #include "private/qdeclarativetransition_p.h" #include "qdeclarativeview.h" +#include "qdeclarativeinfo.h" +#include "private/qdeclarativetypenotavailable_p.h" #ifndef QT_NO_XMLPATTERNS #include "private/qdeclarativexmllistmodel_p.h" #endif @@ -103,7 +105,12 @@ void QDeclarativeUtilModule::defineModule() qmlRegisterType<QDeclarativeTimer>("Qt",4,6,"Timer"); qmlRegisterType<QDeclarativeTransition>("Qt",4,6,"Transition"); qmlRegisterType<QDeclarativeVector3dAnimation>("Qt",4,6,"Vector3dAnimation"); -#ifndef QT_NO_XMLPATTERNS +#ifdef QT_NO_XMLPATTERNS + qmlRegisterTypeNotAvailable("Qt",4,6,"XmlListModel", + qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns")); + qmlRegisterTypeNotAvailable("Qt",4,6,"XmlRole", + qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns")); +#else qmlRegisterType<QDeclarativeXmlListModel>("Qt",4,6,"XmlListModel"); qmlRegisterType<QDeclarativeXmlListModelRole>("Qt",4,6,"XmlRole"); #endif @@ -112,12 +119,11 @@ void QDeclarativeUtilModule::defineModule() qmlRegisterType<QDeclarativeStateOperation>(); qmlRegisterType<QDeclarativeAnchorSet>(); - qmlRegisterUncreatableType<QDeclarativeAbstractAnimation>("Qt",4,6,"Animation"); + qmlRegisterUncreatableType<QDeclarativeAbstractAnimation>("Qt",4,6,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class")); - qmlRegisterCustomType<QDeclarativeListModel>("Qt", 4,6, "ListModel", "QDeclarativeListModel", - new QDeclarativeListModelParser); - qmlRegisterCustomType<QDeclarativePropertyChanges>("Qt", 4, 6, "PropertyChanges", "QDeclarativePropertyChanges", - new QDeclarativePropertyChangesParser); - qmlRegisterCustomType<QDeclarativeConnections>("Qt", 4, 6, "Connections", "QDeclarativeConnections", - new QDeclarativeConnectionsParser); + qmlRegisterCustomType<QDeclarativeListModel>("Qt", 4,6, "ListModel", new QDeclarativeListModelParser); + qmlRegisterCustomType<QDeclarativePropertyChanges>("Qt", 4, 6, "PropertyChanges", new QDeclarativePropertyChangesParser); + qmlRegisterCustomType<QDeclarativeConnections>("Qt", 4, 6, "Connections", new QDeclarativeConnectionsParser); } + +#include "qdeclarativeutilmodule.moc" |