1
0
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:
Anthony Bilinski 2020-05-28 20:59:55 -07:00
parent 6e163ca5ed
commit ca4f9df1ee
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -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.