Skip to content

Commit

Permalink
Fix return values of AbstractPrinting.check_*_support
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Nov 29, 2018
1 parent f81c5b7 commit 609b8f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions qutebrowser/browser/browsertab.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,23 +205,23 @@ def __init__(self, tab: 'AbstractTab') -> None:
self._widget = None
self._tab = tab

def check_pdf_support(self) -> bool:
def check_pdf_support(self) -> None:
"""Check whether writing to PDFs is supported.
If it's not supported (by the current Qt version), a WebTabError is
raised.
"""
raise NotImplementedError

def check_printer_support(self) -> bool:
def check_printer_support(self) -> None:
"""Check whether writing to a printer is supported.
If it's not supported (by the current Qt version), a WebTabError is
raised.
"""
raise NotImplementedError

def check_preview_support(self) -> bool:
def check_preview_support(self) -> None:
"""Check whether showing a print preview is supported.
If it's not supported (by the current Qt version), a WebTabError is
Expand Down
2 changes: 1 addition & 1 deletion qutebrowser/browser/webengine/webenginetab.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class WebEnginePrinting(browsertab.AbstractPrinting):
"""QtWebEngine implementations related to printing."""

def check_pdf_support(self):
return True
pass

def check_printer_support(self):
if not hasattr(self._widget.page(), 'print'):
Expand Down

0 comments on commit 609b8f1

Please sign in to comment.