Fix return values of AbstractPrinting.check_*_support
This commit is contained in:
parent
f81c5b7eab
commit
609b8f1cee
@ -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
|
||||
|
@ -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'):
|
||||
|
Loading…
Reference in New Issue
Block a user