From c904ce144afdf5ae511b863d5c27c171334e0016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Sun, 17 Nov 2024 23:10:49 +0100 Subject: [PATCH] Also skip detailed info in case of QEvent::ChildRemoved --- src/mixxxapplication.cpp | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/mixxxapplication.cpp b/src/mixxxapplication.cpp index 53312f762f0..87fe870eeac 100644 --- a/src/mixxxapplication.cpp +++ b/src/mixxxapplication.cpp @@ -201,23 +201,21 @@ bool MixxxApplication::notify(QObject* pTarget, QEvent* pEvent) { if (m_isDeveloper && time.elapsed() > kEventNotifyExecTimeWarningThreshold) { - if (pEvent->type() == QEvent::DeferredDelete) { + QDebug debug = qDebug(); + debug << "Processing" + << pEvent->type() + << "for object"; + if (pEvent->type() == QEvent::DeferredDelete || + pEvent->type() == QEvent::ChildRemoved) { // pTarget can be already dangling in case of DeferredDelete - qDebug() << "Processing QEvent::DeferredDelete" - << "for object" - << static_cast(pTarget) // will print dangling address - << "took" - << time.elapsed().debugMillisWithUnit(); + debug << static_cast(pTarget); // will print dangling address } else { - qDebug() << "Processing" - << pEvent->type() - << "for object" - << pTarget // will print address, class and object name - << "running in thread:" - << pTarget->thread()->objectName() - << "took" - << time.elapsed().debugMillisWithUnit(); + debug << pTarget // will print address, class and object name + << "running in thread:" + << pTarget->thread()->objectName(); } + debug << "took" + << time.elapsed().debugMillisWithUnit(); } return ret;