Browse Source

Silence buggy QTextBrowser qWarning spam

'QFSFileEngine::open: No file name specified', happens whenever we display a base64 image
pull/607/head
Tux3 / Mlkj / !Lev.uXFMLA 11 years ago
parent
commit
e5afa5f363
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
  1. 5
      src/main.cpp

5
src/main.cpp

@ -32,6 +32,11 @@ void myMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QStr @@ -32,6 +32,11 @@ void myMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QStr
if (!logFile)
return;
// Silence qWarning spam due to bug in QTextBrowser (trying to open a file for base64 images)
if (ctxt.function == QString("virtual bool QFSFileEngine::open(QIODevice::OpenMode)")
&& msg == QString("QFSFileEngine::open: No file name specified"))
return;
dflt(type, ctxt, msg);
*logFile << QTime::currentTime().toString("HH:mm:ss' '") << msg << '\n';
logFile->flush();

Loading…
Cancel
Save