| 345 | } |
| 346 | |
| 347 | void TimerModel::preSignalActivate(QObject *caller, int methodIndex) |
| 348 | { |
| 349 | // We are in the thread of the caller emitting the signal |
| 350 | // The probe did NOT locked the objectLock at this point. |
| 351 | Q_ASSERT(TimerModel::isInitialized()); |
| 352 | |
| 353 | if (!canHandleCaller(caller, methodIndex)) |
| 354 | return; |
| 355 | |
| 356 | QMutexLocker locker(&m_mutex); |
| 357 | const TimerId id(caller); |
| 358 | auto it = m_gatheredTimersData.find(id); |
| 359 | |
| 360 | if (it == m_gatheredTimersData.end()) { |
| 361 | it = m_gatheredTimersData.insert(id, TimerIdData()); |
| 362 | // safe, we are called from the receiver thread, before a slot had a chance to delete caller |
| 363 | it.value().update(id); |
| 364 | } |
| 365 | |
| 366 | if (methodIndex != m_qmlTimerRunningChangedIndex) { |
| 367 | if (it.value().functionCallTimer.isValid()) { |
| 368 | cout << "TimerModel::preSignalActivate(): Recursive timeout for timer " |
| 369 | << ( void * )caller << "!" << endl; |
| 370 | return; |
| 371 | } |
| 372 | it.value().functionCallTimer.start(); |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | void TimerModel::postSignalActivate(QObject *caller, int methodIndex) |
| 377 | { |
no test coverage detected