aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-05-05 15:52:53 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-05-05 15:52:54 +0200
commit9f6a3bf96fabeca58599029f9d9d59b7ed852569 (patch)
treed8a47b67c3b5817d1f5f77c312adbe655b1ca576 /src/qml/types
parente807f9d1d80559b8ff91f1c3cfdd755b3da56a6d (diff)
parenta2eef6b511988b2435c4e39b6b5551e857ce7775 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/qml/types')
-rw-r--r--src/qml/types/qqmlconnections.cpp9
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();
}