summaryrefslogtreecommitdiff
path: root/qutebrowser/browser/pdfjs.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/browser/pdfjs.py')
-rw-r--r--qutebrowser/browser/pdfjs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/qutebrowser/browser/pdfjs.py b/qutebrowser/browser/pdfjs.py
index d531f71d2..c55ab81d1 100644
--- a/qutebrowser/browser/pdfjs.py
+++ b/qutebrowser/browser/pdfjs.py
@@ -96,7 +96,7 @@ def _generate_pdfjs_script(filename):
url.setQuery(url_query)
js_url = javascript.to_js(
- url.toString(QUrl.FullyEncoded)) # type: ignore[arg-type]
+ url.toString(QUrl.ComponentFormattingOption.FullyEncoded)) # type: ignore[arg-type]
return jinja.js_environment.from_string("""
document.addEventListener("DOMContentLoaded", function() {
@@ -237,7 +237,7 @@ def get_main_url(filename: str, original_url: QUrl) -> QUrl:
query = QUrlQuery()
query.addQueryItem('filename', filename) # read from our JS
query.addQueryItem('file', '') # to avoid pdfjs opening the default PDF
- urlstr = original_url.toString(QUrl.FullyEncoded) # type: ignore[arg-type]
+ urlstr = original_url.toString(QUrl.ComponentFormattingOption.FullyEncoded) # type: ignore[arg-type]
query.addQueryItem('source', urlstr)
url.setQuery(query)
return url