Fix return values of AbstractPrinting.check_*_support

This commit is contained in:
Florian Bruhin 2018-11-29 19:10:47 +01:00
parent f81c5b7eab
commit 609b8f1cee
2 changed files with 4 additions and 4 deletions

View File

@ -205,7 +205,7 @@ class AbstractPrinting:
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
@ -213,7 +213,7 @@ class AbstractPrinting:
"""
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
@ -221,7 +221,7 @@ class AbstractPrinting:
"""
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

View File

@ -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'):