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>
This commit is contained in:
Dirk Hohndel 2014-06-09 13:42:16 -07:00
parent a3ce3221fd
commit 863f885012

View file

@ -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"));
}