aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlinfo.cpp
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/qqmlinfo.cpp
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/qqmlinfo.cpp')
-rw-r--r--src/qml/qml/qqmlinfo.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlinfo.cpp b/src/qml/qml/qqmlinfo.cpp
index 66670e2658..32f0eeef36 100644
--- a/src/qml/qml/qqmlinfo.cpp
+++ b/src/qml/qml/qqmlinfo.cpp
@@ -165,6 +165,8 @@ QQmlInfo::~QQmlInfo()
}
}
+namespace QtQml {
+
QQmlInfo qmlInfo(const QObject *me)
{
QQmlInfoPrivate *d = new QQmlInfoPrivate;
@@ -188,5 +190,27 @@ QQmlInfo qmlInfo(const QObject *me, const QList<QQmlError> &errors)
return QQmlInfo(d);
}
+} // namespace QtQml
+
+#if QT_DEPRECATED_SINCE(5, 1)
+
+// Also define symbols outside namespace to keep binary compatibility with Qt 5.0
+
+QQmlInfo qmlInfo(const QObject *me)
+{
+ return QtQml::qmlInfo(me);
+}
+
+QQmlInfo qmlInfo(const QObject *me, const QQmlError &error)
+{
+ return QtQml::qmlInfo(me, error);
+}
+
+QQmlInfo qmlInfo(const QObject *me, const QList<QQmlError> &errors)
+{
+ return QtQml::qmlInfo(me, errors);
+}
+
+#endif // QT_DEPRECATED_SINCE(5, 1)
QT_END_NAMESPACE