From b95750a275a71fe3c344e562e897648b13670c80 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 31 Mar 2014 14:14:08 +0200 Subject: Assistant: Set the url on created QNetworkReply objects. WebKit needs this as a base url in order to resolve links in css for example. If index.html is at the location doc/, and it loads a css stylesheet at href="_static/first.css", and first.css contains @import url("second.css") Then second.css should be found in _static, relative to first.css. That only works if WebKit knows the requested url of the loading document, so make sure that is set on the reply object. This is a backport of part of commit qttools/e38ee135f3cf74f413dc7a3e4a9f97a6b5d903bf Task-number: QTCREATORBUG-8211 Change-Id: Ia92519ab37269a6d3f8bf0e4f8b348595f1f3d59 Reviewed-by: Simon Hausmann --- tools/assistant/tools/assistant/helpviewer_qwv.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp index f9baebf4d8..3a164d23cb 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp @@ -90,6 +90,7 @@ HelpNetworkReply::HelpNetworkReply(const QNetworkRequest &request, TRACE_OBJ setRequest(request); setOpenMode(QIODevice::ReadOnly); + setUrl(request.url()); setHeader(QNetworkRequest::ContentTypeHeader, mimeType); setHeader(QNetworkRequest::ContentLengthHeader, QByteArray::number(origLen)); -- cgit v1.2.3