Commit 6c580fd7 authored by kh1's avatar kh1
Browse files

Make sure we can open local files as well.

Reviewed-by: ck
parent 9aa64498
......@@ -94,13 +94,7 @@ struct ExtensionMap {
bool HelpViewer::isLocalUrl(const QUrl &url)
{
const QString &scheme = url.scheme();
return scheme.isEmpty()
|| scheme == QLatin1String("file")
|| scheme == QLatin1String("qrc")
|| scheme == QLatin1String("data")
|| scheme == QLatin1String("qthelp")
|| scheme == QLatin1String("about");
return url.scheme() == QLatin1String("qthelp");
}
bool HelpViewer::canOpenPage(const QString &url)
......
......@@ -124,10 +124,8 @@ HelpNetworkAccessManager::HelpNetworkAccessManager(QObject *parent)
QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op,
const QNetworkRequest &request, QIODevice* outgoingData)
{
if (!HelpViewer::isLocalUrl(request.url())
&& request.url().scheme() == QLatin1String("http")) {
if (!HelpViewer::isLocalUrl(request.url()))
return QNetworkAccessManager::createRequest(op, request, outgoingData);
}
QString url = request.url().toString();
const QHelpEngineCore &engine = LocalHelpManager::helpEngine();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment