summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkh1 <qt-info@nokia.com>2010-01-19 14:27:13 (GMT)
committerkh1 <qt-info@nokia.com>2010-01-19 14:35:07 (GMT)
commitbeab6d886504c011af9b973d1d0a81ce8e700e30 (patch)
tree3c134d8a0e6aed77f2a2fa529251e03e2d7ac1ea /tools
parent7d8c3cb2e531ce6df8d14096b0b3d31f517e767a (diff)
downloadQt-beab6d886504c011af9b973d1d0a81ce8e700e30.zip
Qt-beab6d886504c011af9b973d1d0a81ce8e700e30.tar.gz
Qt-beab6d886504c011af9b973d1d0a81ce8e700e30.tar.bz2
Return some fake data if we can't handle the network request.
Since we are the only handler for network request and cannot forward the request to our parent (e.g. unwanted net access), we work arround the case we can't handle it. We do create a reply with dummy data which will prevent some blocking and allows further processing of requested data. Task-number: QTBUG-7427 Reviewed-by: kh
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp
index a9abda5..1900c7e 100644
--- a/tools/assistant/tools/assistant/helpviewer.cpp
+++ b/tools/assistant/tools/assistant/helpviewer.cpp
@@ -151,7 +151,8 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
mimeType = QLatin1String("text/html");
}
- return new HelpNetworkReply(request, helpEngine->fileData(url), mimeType);
+ const QByteArray &ba = helpEngine->fileData(url);
+ return new HelpNetworkReply(request, ba.isEmpty() ? " " : ba, mimeType);
}
class HelpPage : public QWebPage