diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-09 13:42:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-09 13:42:16 -0700 |
commit | 863f8850124a29cb486452a50e6e9f35e1d60ab8 (patch) | |
tree | 9a5b074f7d5dd82c9e8d190211d3e86edde0bed1 | |
parent | a3ce3221fdd5edbd234675a2e8cbbc58dc16d11c (diff) | |
download | subsurface-863f8850124a29cb486452a50e6e9f35e1d60ab8.tar.gz |
Make sure Windows can find the user manual
This worked before without the "file:///" prefix, but something else that
I did broke that. Oh well, now it works again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/usermanual.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/qt-ui/usermanual.cpp b/qt-ui/usermanual.cpp index 3985b6cd4..0f3167823 100644 --- a/qt-ui/usermanual.cpp +++ b/qt-ui/usermanual.cpp @@ -41,8 +41,13 @@ UserManual::UserManual(QWidget *parent) : QMainWindow(parent), manual.setFileName(prefix + "_" + lang.left(2) + ".html"); if (!manual.exists()) manual.setFileName(prefix + ".html"); - QUrl url(manual.fileName()); - ui->webView->setUrl(url); + if (!manual.exists()) { + ui->webView->setHtml(tr("Cannot find the Subsurface manual")); + } else { + QString urlString = QString("file:///") + manual.fileName(); + QUrl url(urlString, QUrl::TolerantMode); + ui->webView->setUrl(url); + } } else { ui->webView->setHtml(tr("Cannot find the Subsurface manual")); } |