aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqml.h
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-05-08 10:24:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-15 09:32:58 +0200
commitc74e4a74ba97d32df7406fb684527d415dd8a6ba (patch)
treec3da314e5d631d43a6facb1d0b5c051c2a6cf5ac /src/qml/qml/qqml.h
parent3dbbfe0a9c7dfa309eaed05c49763706428fd0c8 (diff)
Move exports conflicting with QtDeclarative into namespace
Move exported qml* symbols that conflict with QtDeclarative 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: I3d31c36ca4e2faaf6f5d67a77c5c5a304c0338a4 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/qml/qml/qqml.h')
-rw-r--r--src/qml/qml/qqml.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h
index f04cf7d6fa..fb0133f305 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -419,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)