1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Silence buggy QTextBrowser qWarning spam

'QFSFileEngine::open: No file name specified', happens whenever we display a base64 image
This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-11-02 14:17:50 +01:00
parent 071310b82a
commit e5afa5f363
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -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();