summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2009-11-04 15:44:14 (GMT)
committerkh1 <qt-info@nokia.com>2009-11-04 15:47:40 (GMT)
commitde2e9b75c3e71906322ffae1eaa4219a662266c2 (patch)
treec765208495d84e7557863812c3220a2ab4243e1f /tools
parent90b26c211bca82e252dcd31ffa1ef6834bbb6060 (diff)
downloadQt-de2e9b75c3e71906322ffae1eaa4219a662266c2.zip
Qt-de2e9b75c3e71906322ffae1eaa4219a662266c2.tar.gz
Qt-de2e9b75c3e71906322ffae1eaa4219a662266c2.tar.bz2
Fix Assistant to never access the network.
Task-number: QT-1684 Reviewed-by: ck
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp
index 53f3822..c888a5f 100644
--- a/tools/assistant/tools/assistant/helpviewer.cpp
+++ b/tools/assistant/tools/assistant/helpviewer.cpp
@@ -137,24 +137,22 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation op,
const QNetworkRequest &request, QIODevice *outgoingData)
{
const QString& scheme = request.url().scheme();
- if (scheme == QLatin1String("qthelp") || scheme == QLatin1String("about")) {
- const QUrl& url = request.url();
- QString mimeType = url.toString();
- if (mimeType.endsWith(QLatin1String(".svg"))
- || mimeType.endsWith(QLatin1String(".svgz"))) {
- mimeType = QLatin1String("image/svg+xml");
- }
- else if (mimeType.endsWith(QLatin1String(".css"))) {
- mimeType = QLatin1String("text/css");
- }
- else if (mimeType.endsWith(QLatin1String(".js"))) {
- mimeType = QLatin1String("text/javascript");
- } else {
- mimeType = QLatin1String("text/html");
- }
- return new HelpNetworkReply(request, helpEngine->fileData(url), mimeType);
+ const QUrl& url = request.url();
+ QString mimeType = url.toString();
+ if (mimeType.endsWith(QLatin1String(".svg"))
+ || mimeType.endsWith(QLatin1String(".svgz"))) {
+ mimeType = QLatin1String("image/svg+xml");
}
- return QNetworkAccessManager::createRequest(op, request, outgoingData);
+ else if (mimeType.endsWith(QLatin1String(".css"))) {
+ mimeType = QLatin1String("text/css");
+ }
+ else if (mimeType.endsWith(QLatin1String(".js"))) {
+ mimeType = QLatin1String("text/javascript");
+ } else {
+ mimeType = QLatin1String("text/html");
+ }
+
+ return new HelpNetworkReply(request, helpEngine->fileData(url), mimeType);
}
class HelpPage : public QWebPage