From ca4f9df1eecb43779ec7469ec24908a1a5f53a47 Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Thu, 28 May 2020 20:59:55 -0700 Subject: [PATCH] fix(notification): hide snore warning log spam snorenotify logs this when we call requestCloseNotification correctly. The behaviour still works, so we can just mask the warning for now. The issue has been reported upstream: https://github.com/qTox/qTox/pull/6073#pullrequestreview-420748519 --- src/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index e276573f3..0d795abd3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -98,6 +98,16 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QSt && msg == QString("QFSFileEngine::open: No file name specified")) return; + QRegExp snoreFilter{QStringLiteral("Snore::Notification.*was already closed")}; + if (type == QtWarningMsg + && msg.contains(snoreFilter)) + { + // snorenotify logs this when we call requestCloseNotification correctly. The behaviour still works, so we'll + // just mask the warning for now. The issue has been reported upstream: + // https://github.com/qTox/qTox/pull/6073#pullrequestreview-420748519 + return; + } + QString file = ctxt.file; // We're not using QT_MESSAGELOG_FILE here, because that can be 0, NULL, or // nullptr in release builds.