From 062f6cba796e1461eb80cba6254be1b169d7e68c Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 27 Sep 2022 16:41:00 +0200 Subject: [PATCH] Avoid detaching in QBasicTimer Amends da12a40b8b2c2d212412a9db6d7971dc43bce6e6 Change-Id: I2a9e46844a88f7ee239c7306abca3d2c8f7b53d9 Reviewed-by: Thiago Macieira Reviewed-by: Giuseppe D'Angelo --- src/corelib/kernel/qtimerinfo_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qtimerinfo_unix.cpp b/src/corelib/kernel/qtimerinfo_unix.cpp index 288fb30d326..eb173890318 100644 --- a/src/corelib/kernel/qtimerinfo_unix.cpp +++ b/src/corelib/kernel/qtimerinfo_unix.cpp @@ -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