summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qbasictimer.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-02-18 21:09:59 -0800
committerThiago Macieira <thiago.macieira@intel.com>2024-03-13 17:29:13 -0800
commit1ca89b65d85c5df971fac7c1f9d5678e0e0cf45b (patch)
treee08df46eb5d1cc592fa25101bb2c9226c103717f /src/corelib/kernel/qbasictimer.cpp
parentafa86c60e6b6513c5c34b3832a5ece526c071c3f (diff)
QAbstractEventDispatcher: port timer uses to the V2 API
Change-Id: I83dda2d36c904517b3c0fffd17b52b71739928dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/corelib/kernel/qbasictimer.cpp')
-rw-r--r--src/corelib/kernel/qbasictimer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qbasictimer.cpp b/src/corelib/kernel/qbasictimer.cpp
index e7626f7426..17711a355e 100644
--- a/src/corelib/kernel/qbasictimer.cpp
+++ b/src/corelib/kernel/qbasictimer.cpp
@@ -165,7 +165,7 @@ void QBasicTimer::start(std::chrono::milliseconds duration, Qt::TimerType timerT
}
stop();
if (obj)
- id = eventDispatcher->registerTimer(duration.count(), timerType, obj);
+ id = int(eventDispatcher->registerTimer(duration, timerType, obj));
}
/*!
@@ -177,7 +177,7 @@ void QBasicTimer::stop()
{
if (id) {
QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();
- if (eventDispatcher && !eventDispatcher->unregisterTimer(id)) {
+ if (eventDispatcher && !eventDispatcher->unregisterTimer(Qt::TimerId(id))) {
qWarning("QBasicTimer::stop: Failed. Possibly trying to stop from a different thread");
return;
}