From d97a186992fee93e137820e8e942ca3993680e37 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 17 Feb 2019 17:29:27 +0100 Subject: [PATCH] Use qtutils.version_check to check for signal availability With Qt 5.12 but an older PyQt, it looks like the attributes are available, but connecting fails with: TypeError: C++ type 'QWebEngineClientCertificateSelection' is not supported as a signal argument type Let's ensure we require both a new Qt and PyQt instead. --- qutebrowser/browser/webengine/webenginetab.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index b5fd72e66..8f84779c4 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -1505,13 +1505,11 @@ class WebEngineTab(browsertab.AbstractTab): self._on_proxy_authentication_required) page.contentsSizeChanged.connect(self.contents_size_changed) page.navigation_request.connect(self._on_navigation_request) - try: + + if qtutils.version_check('5.12'): page.printRequested.connect(self._on_print_requested) page.selectClientCertificate.connect( self._on_select_client_certificate) - except AttributeError: - # Added in Qt 5.12 - pass view.titleChanged.connect(self.title_changed) view.urlChanged.connect(self._on_url_changed)