summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/animation/qpauseanimation.cpp9
-rw-r--r--src/corelib/kernel/qtimer.cpp8
-rw-r--r--src/gui/image/qmovie.cpp8
3 files changed, 19 insertions, 6 deletions
diff --git a/src/corelib/animation/qpauseanimation.cpp b/src/corelib/animation/qpauseanimation.cpp
index c2599da692..04d8cca273 100644
--- a/src/corelib/animation/qpauseanimation.cpp
+++ b/src/corelib/animation/qpauseanimation.cpp
@@ -129,8 +129,13 @@ void QPauseAnimation::setDuration(int msecs)
return;
}
Q_D(QPauseAnimation);
- d->duration.setValue(msecs);
- d->duration.notify();
+
+ if (msecs != d->duration) {
+ d->duration = msecs;
+ d->duration.notify();
+ } else {
+ d->duration.removeBindingUnlessInWrapper();
+ }
}
QBindable<int> QPauseAnimation::bindableDuration()
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 0946e1af48..333e6c24ba 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -257,9 +257,11 @@ void QTimer::start()
void QTimer::start(int msec)
{
Q_D(QTimer);
+ const bool intervalChanged = msec != d->inter;
d->inter.setValue(msec);
start();
- d->inter.notify();
+ if (intervalChanged)
+ d->inter.notify();
}
@@ -753,6 +755,7 @@ QBindable<bool> QTimer::bindableSingleShot()
void QTimer::setInterval(int msec)
{
Q_D(QTimer);
+ const bool intervalChanged = msec != d->inter;
d->inter.setValue(msec);
if (d->id != INV_TIMER) { // create new timer
QObject::killTimer(d->id); // restart timer
@@ -761,7 +764,8 @@ void QTimer::setInterval(int msec)
// as timer state actually does not change
}
- d->inter.markDirty();
+ if (intervalChanged)
+ d->inter.markDirty();
}
int QTimer::interval() const
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