diff options
Diffstat (limited to 'src/qml/qml/qqml.h')
-rw-r--r-- | src/qml/qml/qqml.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index 7e6e0d1d36..fb0133f305 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -102,6 +102,8 @@ class QQmlPropertyValueInterceptor; listName[listLen+nameLen] = '>'; \ listName[listLen+nameLen+1] = '\0'; +void Q_QML_EXPORT qmlClearTypeRegistrations(); + template<typename T> int qmlRegisterType() { @@ -417,11 +419,17 @@ class QQmlContext; class QQmlEngine; class QJSValue; class QJSEngine; -Q_QML_EXPORT void qmlExecuteDeferred(QObject *); -Q_QML_EXPORT QQmlContext *qmlContext(const QObject *); -Q_QML_EXPORT QQmlEngine *qmlEngine(const QObject *); -Q_QML_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true); -Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, const QMetaObject *, bool create); + +namespace QtQml { + // declared in namespace to avoid symbol conflicts with QtDeclarative + Q_QML_EXPORT void qmlExecuteDeferred(QObject *); + Q_QML_EXPORT QQmlContext *qmlContext(const QObject *); + Q_QML_EXPORT QQmlEngine *qmlEngine(const QObject *); + Q_QML_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true); + Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, + const QMetaObject *, bool create); +} +using namespace QtQml; template<typename T> QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true) |