Don't connect Qt 5.11 signals on PyQt 5.10

Apparently the signal attributes already exist with PyQt 5.10 (*sigh*) but PyQt
doesn't know what to do with the arguments, causing this to happen:

TypeError: unable to convert a C++ 'QWebEngineRegisterProtocolHandlerRequest'
instance to a Python object
This commit is contained in:
Florian Bruhin 2018-06-11 21:21:41 +02:00
parent d42934af08
commit a6b314ae91

View File

@ -660,14 +660,12 @@ class _WebEnginePermissions(QObject):
self._on_fullscreen_requested)
page.featurePermissionRequested.connect(
self._on_feature_permission_requested)
try:
if qtutils.version_check('5.11'):
page.quotaRequested.connect(
self._on_quota_requested)
page.registerProtocolHandlerRequested.connect(
self._on_register_protocol_handler_requested)
except AttributeError:
# Added in Qt 5.11
pass
self._tab.shutting_down.connect(self._abort_questions)
self._tab.load_started.connect(self._abort_questions)