diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-05-08 10:24:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-15 09:32:58 +0200 |
commit | c74e4a74ba97d32df7406fb684527d415dd8a6ba (patch) | |
tree | c3da314e5d631d43a6facb1d0b5c051c2a6cf5ac /src/qml/qml/qqmlengine.cpp | |
parent | 3dbbfe0a9c7dfa309eaed05c49763706428fd0c8 (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/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 377d0c49d6..bb3ac938c3 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1279,6 +1279,8 @@ void QQmlEnginePrivate::doDeleteInEngineThread() delete d; } +namespace QtQml { + Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) { QQmlData *data = QQmlData::get(object); @@ -1352,6 +1354,41 @@ QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, return qmlAttachedPropertiesObjectById(*idCache, object, create); } +} // namespace QtQml + +#if QT_DEPRECATED_SINCE(5, 1) + +// Also define symbols outside namespace to keep binary compatibility with Qt 5.0 + +Q_QML_EXPORT void qmlExecuteDeferred(QObject *obj) +{ + QtQml::qmlExecuteDeferred(obj); +} + +Q_QML_EXPORT QQmlContext *qmlContext(const QObject *obj) +{ + return QtQml::qmlContext(obj); +} + +Q_QML_EXPORT QQmlEngine *qmlEngine(const QObject *obj) +{ + return QtQml::qmlEngine(obj); +} + +Q_QML_EXPORT QObject *qmlAttachedPropertiesObjectById(int id, const QObject *obj, bool create) +{ + return QtQml::qmlAttachedPropertiesObjectById(id, obj, create); +} + +Q_QML_EXPORT QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object, + const QMetaObject *attachedMetaObject, + bool create) +{ + return QtQml::qmlAttachedPropertiesObject(idCache, object, attachedMetaObject, create); +} + +#endif // QT_DEPRECATED_SINCE(5, 1) + QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool printWarning) { #ifndef QQML_NO_DEBUG_PROTOCOL |