From a4d1ed854d14f3f15218f6c9bc2ff190259a4d5a Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 7 Apr 2021 13:41:17 +0200 Subject: Do not notify about property changes if the value hasn't changed After 2ffb91ac592d69adf9458ac45074174537435918 we manually call notify() for QObjectCompatProperties. Currently we always call it when setting values to compat properties, even if the value hasn't actually changed. Fixed to call notify() only if the value is being changed. Task-number: QTBUG-85520 Change-Id: I385db84c4009c45406e204b96e0e37ce5fa8882b Reviewed-by: Andreas Buhr Reviewed-by: Fabian Kosmale --- src/gui/image/qmovie.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp index a293d358cf..b00d3ff25c 100644 --- a/src/gui/image/qmovie.cpp +++ b/src/gui/image/qmovie.cpp @@ -929,8 +929,12 @@ void QMovie::setSpeed(int percentSpeed) Q_D(QMovie); if (!d->speed && d->movieState == Running) d->nextImageTimer.start(nextFrameDelay()); - d->speed.setValue(percentSpeed); - d->speed.notify(); + if (percentSpeed != d->speed) { + d->speed = percentSpeed; + d->speed.notify(); + } else { + d->speed.removeBindingUnlessInWrapper(); + } } int QMovie::speed() const -- cgit v1.2.3