Use functools instead of a lambda for QTimer
It reads nicer, and this is also speculative fix for #3896 as PyQt5 is hopefully better at disconnecting partial-objects from dead objects than it is with lambdas.
This commit is contained in:
parent
26e37739e2
commit
7162f15348
@ -1035,8 +1035,9 @@ class WebEngineTab(browsertab.AbstractTab):
|
||||
log.config.debug(
|
||||
"Loading {} again because of config change".format(
|
||||
self._reload_url.toDisplayString()))
|
||||
QTimer.singleShot(100, lambda url=self._reload_url:
|
||||
self.openurl(url, predict=False))
|
||||
QTimer.singleShot(100, functools.partial(self.openurl,
|
||||
self._reload_url,
|
||||
predict=False))
|
||||
self._reload_url = None
|
||||
|
||||
if not qtutils.version_check('5.10', compiled=False):
|
||||
|
Loading…
Reference in New Issue
Block a user