mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
a3ce3221fd
commit
863f885012
1 changed files with 7 additions and 2 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue