summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2014-03-31 12:14:08 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-31 15:26:33 (GMT)
commitb95750a275a71fe3c344e562e897648b13670c80 (patch)
treece3efa7cda89f2f1eafdf618343807bd08bd02dd
parent215a78618b185a71f660201c902da51360d8c30d (diff)
downloadQt-b95750a275a71fe3c344e562e897648b13670c80.zip
Qt-b95750a275a71fe3c344e562e897648b13670c80.tar.gz
Qt-b95750a275a71fe3c344e562e897648b13670c80.tar.bz2
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 <simon.hausmann@digia.com>
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
index f9baebf..3a164d2 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));