WebSites: Don't show query error messages for "file://" scheme

This commit is contained in:
Abs62 2017-03-04 15:02:13 +03:00
parent 9a5ab81cd7
commit 685cdab704

View file

@ -9,6 +9,7 @@
#include <QDir> #include <QDir>
#include <QFileInfo> #include <QFileInfo>
#include <QRegExp> #include <QRegExp>
#include "gddebug.hh"
namespace WebSite { namespace WebSite {
@ -333,7 +334,17 @@ void WebSiteArticleRequest::requestFinished( QNetworkReply * r )
} }
else else
setErrorString( netReply->errorString() ); {
if( netReply->url().scheme() == "file" )
{
gdWarning( "WebSites: Failed loading article from \"%s\", reason: %s\n", dictPtr->getName().c_str(),
netReply->errorString().toUtf8().data() );
}
else
{
setErrorString( netReply->errorString() );
}
}
netReply->deleteLater(); netReply->deleteLater();