Disable workaround for PyQt 5.3.2
This commit is contained in:
parent
74b45aea47
commit
3391896037
@ -242,21 +242,21 @@ class BrowserPage(QWebPage):
|
|||||||
return super().extension(ext, opt, out)
|
return super().extension(ext, opt, out)
|
||||||
return handler(opt, out)
|
return handler(opt, out)
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
# WORKAROUND:
|
if PYQT_VERSION >= 0x50302:
|
||||||
#
|
raise
|
||||||
# Due to a bug in PyQt, exceptions inside extension() get
|
else:
|
||||||
# swallowed:
|
# WORKAROUND:
|
||||||
# http://www.riverbankcomputing.com/pipermail/pyqt/2014-August/034722.html
|
#
|
||||||
#
|
# Due to a bug in PyQt, exceptions inside extension() get
|
||||||
# We used to re-raise the exception with a single-shot QTimer here,
|
# swallowed:
|
||||||
# but that lead to a strange proble with a KeyError with some
|
# http://www.riverbankcomputing.com/pipermail/pyqt/2014-August/034722.html
|
||||||
# random jinja template stuff as content. For now, we only log it,
|
#
|
||||||
# so it doesn't pass 100% silently.
|
# We used to re-raise the exception with a single-shot QTimer
|
||||||
#
|
# here, but that lead to a strange proble with a KeyError with
|
||||||
# FIXME: This should be fixed with PyQt 5.3.2 - re-check when it's
|
# some random jinja template stuff as content. For now, we only
|
||||||
# out and raise the exception normally if possible.
|
# log it, so it doesn't pass 100% silently.
|
||||||
log.webview.exception("Error inside WebPage::extension")
|
log.webview.exception("Error inside WebPage::extension")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def javaScriptAlert(self, _frame, msg):
|
def javaScriptAlert(self, _frame, msg):
|
||||||
"""Override javaScriptAlert to use the statusbar."""
|
"""Override javaScriptAlert to use the statusbar."""
|
||||||
|
Loading…
Reference in New Issue
Block a user