aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-11-19 10:01:25 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-11-19 09:15:08 +0000
commit31afb6b70513cc673d17fc72f081f19ac80e7111 (patch)
tree6c6e219008b10970a63a93aa18f08baa6f3c6d60 /src/qml
parentcb3cfdf661483ada83a2189b220ad893d5acf223 (diff)
Remove compatibility shim from qmlinfo.{cpp|h}
We don't need to handle symbol clashes with QtQuick1 anymore. [ChangeLog][QtQml] The functions qmlDebug, qmlInfo, and qmlWarning are no longer available in the QtQml namespace. Use their counterparts in the global namespace. Fixes: QTBUG-88637 Change-Id: Ia74510bd711790cebf55de4cd668891712f6835e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/qml/qqmlinfo.cpp26
-rw-r--r--src/qml/qml/qqmlinfo.h44
-rw-r--r--src/qml/qml/qqmlpropertybinding.cpp2
3 files changed, 19 insertions, 53 deletions
diff --git a/src/qml/qml/qqmlinfo.cpp b/src/qml/qml/qqmlinfo.cpp
index 8852f609e9..7a2521b7b8 100644
--- a/src/qml/qml/qqmlinfo.cpp
+++ b/src/qml/qml/qqmlinfo.cpp
@@ -248,8 +248,6 @@ QQmlInfo::~QQmlInfo()
}
}
-namespace QtQml {
-
#define MESSAGE_FUNCS(FuncName, MessageLevel) \
QQmlInfo FuncName(const QObject *me) \
{ \
@@ -276,28 +274,4 @@ MESSAGE_FUNCS(qmlDebug, QtMsgType::QtDebugMsg)
MESSAGE_FUNCS(qmlInfo, QtMsgType::QtInfoMsg)
MESSAGE_FUNCS(qmlWarning, QtMsgType::QtWarningMsg)
-
-} // 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
diff --git a/src/qml/qml/qqmlinfo.h b/src/qml/qml/qqmlinfo.h
index a3ceb405b8..fe865658d4 100644
--- a/src/qml/qml/qqmlinfo.h
+++ b/src/qml/qml/qqmlinfo.h
@@ -49,25 +49,17 @@ QT_BEGIN_NAMESPACE
class QQmlInfo;
-// declared in namespace to avoid symbol conflicts with QtDeclarative
-namespace QtQml {
- Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me);
- Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me, const QQmlError &error);
- Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me, const QList<QQmlError> &errors);
+Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me);
+Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me, const QQmlError &error);
+Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me, const QList<QQmlError> &errors);
- Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me);
- Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QQmlError &error);
- Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QList<QQmlError> &errors);
+Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me);
+Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QQmlError &error);
+Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QList<QQmlError> &errors);
- Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me);
- Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me, const QQmlError &error);
- Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me, const QList<QQmlError> &errors);
-}
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_CLANG("-Wheader-hygiene")
-// This is necessary to allow for QtQuick1 and QtQuick2 scenes in a single application.
-using namespace QtQml;
-QT_WARNING_POP
+Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me);
+Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me, const QQmlError &error);
+Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me, const QList<QQmlError> &errors);
class QQmlInfoPrivate;
class Q_QML_EXPORT QQmlInfo : public QDebug
@@ -102,15 +94,15 @@ public:
#endif
private:
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlDebug(const QObject *me);
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlDebug(const QObject *me, const QQmlError &error);
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlDebug(const QObject *me, const QList<QQmlError> &errors);
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlInfo(const QObject *me);
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlInfo(const QObject *me, const QQmlError &error);
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlInfo(const QObject *me, const QList<QQmlError> &errors);
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlWarning(const QObject *me);
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlWarning(const QObject *me, const QQmlError &error);
- friend Q_QML_EXPORT QQmlInfo QtQml::qmlWarning(const QObject *me, const QList<QQmlError> &errors);
+ friend Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me);
+ friend Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me, const QQmlError &error);
+ friend Q_QML_EXPORT QQmlInfo qmlDebug(const QObject *me, const QList<QQmlError> &errors);
+ friend Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me);
+ friend Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QQmlError &error);
+ friend Q_QML_EXPORT QQmlInfo qmlInfo(const QObject *me, const QList<QQmlError> &errors);
+ friend Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me);
+ friend Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me, const QQmlError &error);
+ friend Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me, const QList<QQmlError> &errors);
QQmlInfo(QQmlInfoPrivate *);
QQmlInfoPrivate *d;
diff --git a/src/qml/qml/qqmlpropertybinding.cpp b/src/qml/qml/qqmlpropertybinding.cpp
index d56d41f834..656e2788c4 100644
--- a/src/qml/qml/qqmlpropertybinding.cpp
+++ b/src/qml/qml/qqmlpropertybinding.cpp
@@ -82,7 +82,7 @@ void QQmlPropertyBinding::expressionChanged()
err.setLine(location.line);
err.setColumn(location.column);
err.setDescription(QString::fromLatin1("Binding loop detected"));
- QtQml::qmlWarning(this->scopeObject(), err);
+ qmlWarning(this->scopeObject(), err);
return;
}
m_error.setTag(currentTag | InEvaluationLoop);