summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2010-02-16 11:04:14 (GMT)
committerkh1 <qt-info@nokia.com>2010-02-16 11:10:46 (GMT)
commit7ca8482115ab159b6fdea9fbff6839700dd8ee6e (patch)
treeaac79605694e9f0affadc793ab85c45454ec26da
parente3f342d60cb25a7c90f9401102c750e239a16e53 (diff)
downloadQt-7ca8482115ab159b6fdea9fbff6839700dd8ee6e.zip
Qt-7ca8482115ab159b6fdea9fbff6839700dd8ee6e.tar.gz
Qt-7ca8482115ab159b6fdea9fbff6839700dd8ee6e.tar.bz2
Fix broken image loading on windows.
Make sure the url is valid and we could find the file in the compressed help, otherwise pass on an error message. We might have got garbage in the first patch, so the isEmpty() check was not sufficient. Do not integrate in master, since it was fixed already there. Task-number: QTBUG-8082, QTBUG-8248 Reviewed-by: ck
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp
index be6245a..f22ab8a 100644
--- a/tools/assistant/tools/assistant/helpviewer.cpp
+++ b/tools/assistant/tools/assistant/helpviewer.cpp
@@ -151,8 +151,9 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
mimeType = QLatin1String("text/html");
}
- const QByteArray &ba = helpEngine->fileData(url);
- return new HelpNetworkReply(request, ba.isEmpty() ? " " : ba, mimeType);
+ const QByteArray &data = helpEngine->findFile(url).isValid()
+ ? helpEngine->fileData(url) : QByteArray("File not found!");
+ return new HelpNetworkReply(request, data, mimeType);
}
class HelpPage : public QWebPage