This commit is contained in:
Florian Bruhin 2020-06-13 00:40:08 +02:00
parent 306eff2f94
commit 6d8553af3a
2 changed files with 7 additions and 4 deletions

View File

@ -19,6 +19,8 @@
"""The main browser widget for QtWebEngine."""
import typing
from PyQt5.QtCore import pyqtSignal, QUrl, PYQT_VERSION
from PyQt5.QtGui import QPalette
from PyQt5.QtWidgets import QWidget
@ -68,7 +70,7 @@ class WebEngineView(QWebEngineView):
The above bug got introduced in Qt 5.11.0 and fixed in 5.12.0.
"""
proxy = self.focusProxy()
proxy = self.focusProxy() # type: typing.Optional[QWidget]
if 'lost-focusproxy' in objects.debug_flags:
proxy = None
@ -85,7 +87,7 @@ class WebEngineView(QWebEngineView):
if children:
log.webview.debug("Found possibly lost focusProxy: {}"
.format(children))
.format(children))
return children[-1] if children else None

View File

@ -105,8 +105,9 @@ def _is_secure_cipher(cipher):
def init():
"""Disable insecure SSL ciphers on old Qt versions."""
default_ciphers = QSslSocket.defaultCiphers()
log.init.vdebug("Default Qt ciphers: {}".format(
', '.join(c.name() for c in default_ciphers)))
log.init.vdebug( # type: ignore[attr-defined]
"Default Qt ciphers: {}".format(
', '.join(c.name() for c in default_ciphers)))
good_ciphers = []
bad_ciphers = []