Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.6
-
None
-
-
1
-
612b67cf1 (dev), 40e56294f (6.7), 148ec9eb9 (6.6), 858e5f3ee (tqtc/lts-6.5)
-
Foundation Sprint 101
Description
Calling QTimer::start with negative values will not start any timer but instead print the warning from QObject::startTimer. However QTimer::isActive will return true even though it's not really running
This can produce some nasty bugs in conjunction with QTBUG-67383
For example simplified:
QTimer timer; timer.setSingleShot(true); connect(&timer, QTimer::timeout, &doTheThing); [...] // Somehere else void scheduleDoingTheThing() if (timer.isActive()) // Don't do the thing yet, timer still running return; std::chrono::milliseconds interval(biggerthanintmax); // actually result of a calculation timer.start(interval)