We need to check for namespace nokia too.

Reviewed-by: ck
This commit is contained in:
kh1
2010-04-28 15:04:00 +02:00
parent 2c64aa0571
commit b0f9b1d491
3 changed files with 5 additions and 3 deletions

View File

@@ -44,7 +44,8 @@
using namespace Help::Internal; using namespace Help::Internal;
const QString HelpViewer::DocPath = QLatin1String("qthelp://com.trolltech."); const QString HelpViewer::NsNokia = QLatin1String("qthelp://com.nokia.");
const QString HelpViewer::NsTrolltech = QLatin1String("qthelp://com.trolltech.");
const QString HelpViewer::AboutBlankPage = const QString HelpViewer::AboutBlankPage =
QCoreApplication::translate("HelpViewer", "<title>about:blank</title>"); QCoreApplication::translate("HelpViewer", "<title>about:blank</title>");

View File

@@ -85,7 +85,8 @@ public:
bool findText(const QString &text, Find::IFindSupport::FindFlags flags, bool findText(const QString &text, Find::IFindSupport::FindFlags flags,
bool incremental, bool fromSearch); bool incremental, bool fromSearch);
static const QString DocPath; static const QString NsNokia;
static const QString NsTrolltech;
static const QString AboutBlankPage; static const QString AboutBlankPage;
static const QString PageNotFoundMessage; static const QString PageNotFoundMessage;

View File

@@ -132,7 +132,7 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/,
// html, thus a path inside the css like (../images/foo.png) might cd out of // html, thus a path inside the css like (../images/foo.png) might cd out of
// the virtual folder // the virtual folder
if (!engine.findFile(url).isValid()) { if (!engine.findFile(url).isValid()) {
if (url.startsWith(HelpViewer::DocPath)) { if (url.startsWith(HelpViewer::NsNokia) || url.startsWith(HelpViewer::NsTrolltech)) {
QUrl newUrl = request.url(); QUrl newUrl = request.url();
if (!newUrl.path().startsWith(QLatin1String("/qdoc/"))) { if (!newUrl.path().startsWith(QLatin1String("/qdoc/"))) {
newUrl.setPath(QLatin1String("/qdoc/") + newUrl.path()); newUrl.setPath(QLatin1String("/qdoc/") + newUrl.path());