From 9f98bfd81d4831b1e2c8ffa7802f51bfb99be4a2 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 12 Nov 2020 16:29:31 +0100 Subject: QQmlEngine::captureProperty(): Don't capture constant properties That is a noop and produces a warning. Change-Id: I75787aee66b55522005247524140e3f3a7dd56ba Reviewed-by: Fabian Kosmale --- src/qml/qml/qqmlengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index c41c1d9a54..2a35c27cc6 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -1335,7 +1335,7 @@ void QQmlEngine::setOutputWarningsToStandardError(bool enabled) void QQmlEngine::captureProperty(QObject *object, const QMetaProperty &property) const { Q_D(const QQmlEngine); - if (d->propertyCapture) { + if (d->propertyCapture && !property.isConstant()) { d->propertyCapture->captureProperty( object, property.propertyIndex(), QMetaObjectPrivate::signalIndex(property.notifySignal())); -- cgit v1.2.3