diff options
Diffstat (limited to 'qt-ui/usermanual.cpp')
-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")); } |