mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
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
This commit is contained in:
parent
6e163ca5ed
commit
ca4f9df1ee
10
src/main.cpp
10
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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user