Avoid detaching in QBasicTimer

Amends da12a40b8b

Change-Id: I2a9e46844a88f7ee239c7306abca3d2c8f7b53d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
hjk 2022-09-27 16:41:00 +02:00
parent a6e8ee141d
commit 062f6cba79

View File

@ -390,7 +390,7 @@ qint64 QTimerInfoList::timerRemainingTime(int timerId)
repairTimersIfNeeded();
timespec tm = {0, 0};
for (const auto *t : *this) {
for (const auto *t : qAsConst(*this)) {
if (t->id == timerId) {
if (currentTime < t->timeout) {
// time to wait