diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-05-07 09:45:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-13 08:41:33 +0200 |
commit | 8c02d79c5b7d769c848c0441c4e9a6f1e0a41912 (patch) | |
tree | fb2cbcba71774810cebabdabbb799368b43aa156 /src/declarative/qml/qdeclarative.h | |
parent | 100cfb7c71b5dfb507d7b470bf60df49c36d9e40 (diff) |
Move exports conflicting with QtQml into namespace
Move exported qml* symbols that conflict with QtQml into an - automatically
imported - namespace. This ensures apps can link against both
QtDeclarative and QtQml.
To keep the BC promise the old symbols are still exported.
Task-number: QTBUG-29584
Change-Id: Icf4e586fee51d2bd82125398e2bb96d6dd355cc5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/declarative/qml/qdeclarative.h')
-rw-r--r-- | src/declarative/qml/qdeclarative.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index dd08105e..95cef935 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -404,11 +404,18 @@ inline int qmlRegisterType(const QUrl &url, const char *uri, int versionMajor, i class QDeclarativeContext; class QDeclarativeEngine; -Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *); -Q_DECLARATIVE_EXPORT QDeclarativeContext *qmlContext(const QObject *); -Q_DECLARATIVE_EXPORT QDeclarativeEngine *qmlEngine(const QObject *); -Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, bool create = true); -Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, const QMetaObject *, bool create); + +namespace QtDeclarative { + // declared in namespace to avoid symbol conflicts with QtQml + Q_DECLARATIVE_EXPORT void qmlExecuteDeferred(QObject *); + Q_DECLARATIVE_EXPORT QDeclarativeContext *qmlContext(const QObject *); + Q_DECLARATIVE_EXPORT QDeclarativeEngine *qmlEngine(const QObject *); + Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObjectById(int, const QObject *, + bool create = true); + Q_DECLARATIVE_EXPORT QObject *qmlAttachedPropertiesObject(int *, const QObject *, + const QMetaObject *, bool create); +} +using namespace QtDeclarative; template<typename T> QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true) |