Set title when showing PDF.js error page

Fixes #3894
This commit is contained in:
Florian Bruhin 2018-06-28 11:22:44 +02:00
parent e9c78b29ed
commit a7af5195d1
2 changed files with 4 additions and 1 deletions

View File

@ -116,6 +116,8 @@ Fixed
- The security fix in v1.3.3 caused URLs with ampersands
(`www.example.com?one=1&two=2`) to send the wrong arguments when clicked on
the `qute://history` page.
- Crash when opening a PDF page with PDF.js enabled (on QtWebKit), but no
PDF.js installed.
Removed
~~~~~~~

View File

@ -212,7 +212,8 @@ class BrowserPage(QWebPage):
page = pdfjs.generate_pdfjs_page(reply.url())
except pdfjs.PDFJSNotFound:
page = jinja.render('no_pdfjs.html',
url=reply.url().toDisplayString())
url=reply.url().toDisplayString(),
title="PDF.js not found")
self.mainFrame().setContent(page.encode('utf-8'), 'text/html',
reply.url())
reply.deleteLater()