Track worker construction and destruction

Added debug log messages in case a worker still exists when the `qApp` is destroyed.
This would mean that a `quitAndWait` is missing or is being skipped somewhere.
This commit is contained in:
Mat Sutcliffe
2020-03-28 22:09:25 +00:00
parent e5528288b5
commit 2f1e3f47f9
3 changed files with 30 additions and 0 deletions

View File

@@ -173,6 +173,14 @@ namespace BlackCore
m_inputManager = new CInputManager(this);
m_inputManager->createDevices();
}
connect(this, &QObject::destroyed, [cat = CLogCategoryList(this)]
{
for (CWorkerBase *worker : CWorkerBase::allWorkers())
{
CLogMessage(cat).debug(u"Worker named '%1' still exists after application destroyed") << worker->objectName();
}
});
}
}