Browse Source

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
reviewable/pr6073/r10
Anthony Bilinski 5 years ago
parent
commit
ca4f9df1ee
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 10
      src/main.cpp

10
src/main.cpp

@ -98,6 +98,16 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QSt @@ -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…
Cancel
Save