BLACK_AUDIT_X for killTimer, trace Qt killTimer warnings in "our" code

This commit is contained in:
Klaus Basan
2020-01-27 15:13:14 +01:00
committed by Mat Sutcliffe
parent 4ca3a925ce
commit 481833b003
3 changed files with 24 additions and 5 deletions

View File

@@ -7,6 +7,8 @@
*/
#include "blackmisc/filedeleter.h"
#include "blackmisc/threadutils.h"
#include "blackmisc/verify.h"
#include <QFile>
#include <QtGlobal>
@@ -58,7 +60,11 @@ namespace BlackMisc
void CTimedFileDeleter::timerEvent(QTimerEvent *event)
{
Q_UNUSED(event)
if (m_timerId > 0) { this->killTimer(m_timerId); }
if (m_timerId >= 0)
{
BLACK_AUDIT_X(CThreadUtils::isCurrentThreadObjectThread(this), Q_FUNC_INFO, "Try to kill timer from another thread");
this->killTimer(m_timerId);
}
m_timerId = -1;
m_fileDeleter.deleteFiles();
this->deleteLater();