summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-02-03 10:16:18 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2021-04-16 16:49:29 +0200
commitcf42a0fe5e525efa9a399694cc6882c6e811c286 (patch)
tree5c7489ade522716e67fddba7772beab6ee240488 /src/corelib/kernel/qtimer.cpp
parentd72067c93833e9787a45aeddee800faab0d2d40a (diff)
Remove lazy binding evaluation
Too much of the existing code in Qt requires eager evaluation without large scale modifications. Combined with the fact that supporting both eager and lazy evaluation has a high maintenance burden, keeping lazy evaluation, at least in its current state, is not worth it. This does not diminish other benefits of the new property system, which include - a C++ API to setup and modify bindings and - faster execution compared to QML's existing bindings and the ability to use them without having a QML engine. We do no longer benefit from doing less work thanks to laziness. A later commit will introduce grouping support to recapture some of this benefit. [ChangeLog][Import Behavior Change][QProperty] QProperty uses always eager evaluation now when a dependency in a binding changes. Change-Id: I34694fd5c7bcb1d31a0052d2e3da8b68d016671b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
-rw-r--r--src/corelib/kernel/qtimer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 333e6c24ba5..10e26fcdef6 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -241,7 +241,7 @@ void QTimer::start()
stop();
d->nulltimer = (!d->inter && d->single);
d->id = QObject::startTimer(d->inter, d->type);
- d->isActiveData.markDirty();
+ d->isActiveData.notify();
}
/*!
@@ -278,7 +278,7 @@ void QTimer::stop()
if (d->id != INV_TIMER) {
QObject::killTimer(d->id);
d->id = INV_TIMER;
- d->isActiveData.markDirty();
+ d->isActiveData.notify();
}
}
@@ -763,9 +763,8 @@ void QTimer::setInterval(int msec)
// No need to call markDirty() for d->isActiveData here,
// as timer state actually does not change
}
-
if (intervalChanged)
- d->inter.markDirty();
+ d->inter.notify();
}
int QTimer::interval() const