summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeinfo.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-05-07 09:45:27 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-13 08:41:33 +0200
commit8c02d79c5b7d769c848c0441c4e9a6f1e0a41912 (patch)
treefb2cbcba71774810cebabdabbb799368b43aa156 /src/declarative/qml/qdeclarativeinfo.cpp
parent100cfb7c71b5dfb507d7b470bf60df49c36d9e40 (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/qdeclarativeinfo.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeinfo.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp
index 30c89d8e..960cc352 100644
--- a/src/declarative/qml/qdeclarativeinfo.cpp
+++ b/src/declarative/qml/qdeclarativeinfo.cpp
@@ -152,6 +152,8 @@ QDeclarativeInfo::~QDeclarativeInfo()
}
}
+namespace QtDeclarative {
+
QDeclarativeInfo qmlInfo(const QObject *me)
{
QDeclarativeInfoPrivate *d = new QDeclarativeInfoPrivate;
@@ -175,5 +177,29 @@ QDeclarativeInfo qmlInfo(const QObject *me, const QList<QDeclarativeError> &erro
return QDeclarativeInfo(d);
}
+} // namespace QtDeclarative
+
+#if QT_DEPRECATED_SINCE(5, 1)
+
+// Also define symbols outside namespace to keep binary compatibility with 5.0
+
+Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me)
+{
+ return QtDeclarative::qmlInfo(me);
+}
+
+Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me,
+ const QDeclarativeError &error)
+{
+ return QtDeclarative::qmlInfo(me, error);
+}
+
+Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me,
+ const QList<QDeclarativeError> &errors)
+{
+ return QtDeclarative::qmlInfo(me, errors);
+}
+
+#endif // QT_DEPRECATED_SINCE(5, 1)
QT_END_NAMESPACE