diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-05-05 15:52:53 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-05-05 15:52:54 +0200 |
commit | 9f6a3bf96fabeca58599029f9d9d59b7ed852569 (patch) | |
tree | d8a47b67c3b5817d1f5f77c312adbe655b1ca576 /src/qml/types | |
parent | e807f9d1d80559b8ff91f1c3cfdd755b3da56a6d (diff) | |
parent | a2eef6b511988b2435c4e39b6b5551e857ce7775 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I0e495f3d59f2a507aeb73c013e1d8ec0668313c4
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmlconnections.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/types/qqmlconnections.cpp b/src/qml/types/qqmlconnections.cpp index 29946b1da4..c913e2d11a 100644 --- a/src/qml/types/qqmlconnections.cpp +++ b/src/qml/types/qqmlconnections.cpp @@ -47,6 +47,7 @@ #include <private/qqmlvmemetaobject_p.h> #include <qqmlinfo.h> +#include <QtCore/qloggingcategory.h> #include <QtCore/qdebug.h> #include <QtCore/qstringlist.h> @@ -54,6 +55,8 @@ QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(lcQmlConnections, "qt.qml.connections") + class QQmlConnectionsPrivate : public QObjectPrivate { public: @@ -276,8 +279,10 @@ void QQmlConnections::connectSignals() connectSignalsToMethods(); } else { #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) - qmlWarning(this) << tr("Implicitly defined onFoo properties in Connections are deprecated. " - "Use this syntax instead: function onFoo(<arguments>) { ... }"); + if (lcQmlConnections().isWarningEnabled()) { + qmlWarning(this) << tr("Implicitly defined onFoo properties in Connections are deprecated. " + "Use this syntax instead: function onFoo(<arguments>) { ... }"); + } #endif connectSignalsToBindings(); } |