more logging for notifications

This commit is contained in:
Martin Rotter 2025-05-21 07:21:17 +02:00
parent 7fc5d1b582
commit f7f45375f8

View file

@ -77,10 +77,12 @@ void BaseToastNotification::setupTimedClosing(bool want_shorter_timeout) {
bool BaseToastNotification::eventFilter(QObject* watched, QEvent* event) { bool BaseToastNotification::eventFilter(QObject* watched, QEvent* event) {
if (watched == this && event->type() == QEvent::Type::Enter) { if (watched == this && event->type() == QEvent::Type::Enter) {
qDebugNN << LOGSEC_NOTIFICATIONS << "Notification got ENTER event.";
stopTimedClosing(); stopTimedClosing();
} }
if (watched == this && event->type() == QEvent::Type::Leave) { if (watched == this && event->type() == QEvent::Type::Leave) {
qDebugNN << LOGSEC_NOTIFICATIONS << "Notification got LEAVE event.";
setupTimedClosing(true); setupTimedClosing(true);
} }
@ -99,12 +101,14 @@ bool BaseToastNotification::eventFilter(QObject* watched, QEvent* event) {
void BaseToastNotification::closeEvent(QCloseEvent* event) { void BaseToastNotification::closeEvent(QCloseEvent* event) {
Q_UNUSED(event) Q_UNUSED(event)
qDebugNN << LOGSEC_NOTIFICATIONS << "Notification got CLOSE event.";
stopTimedClosing(); stopTimedClosing();
emit closeRequested(this); emit closeRequested(this);
} }
void BaseToastNotification::timerEvent(QTimerEvent* event) { void BaseToastNotification::timerEvent(QTimerEvent* event) {
if (event->timerId() == m_timerId) { if (event->timerId() == m_timerId) {
qDebugNN << LOGSEC_NOTIFICATIONS << "Notification got TIMER event.";
stopTimedClosing(); stopTimedClosing();
emit closeRequested(this); emit closeRequested(this);
} }