Fix lint
This commit is contained in:
parent
7d1316fe03
commit
66719c5ecc
@ -208,6 +208,7 @@ class MouseEventFilter(QObject):
|
||||
if evtype not in self._handlers:
|
||||
return False
|
||||
if obj is not self._tab.event_target():
|
||||
log.mouse.debug("Ignoring {} to {}".format(event.__class__.__name__, obj))
|
||||
log.mouse.debug("Ignoring {} to {}".format(event.__class__.__name__,
|
||||
obj))
|
||||
return False
|
||||
return self._handlers[evtype](event)
|
||||
|
@ -393,7 +393,7 @@ class AbstractWebElement(collections.abc.MutableMapping):
|
||||
"""Simulate a click on the element.
|
||||
|
||||
Args:
|
||||
click_target: An usertypes.ClickTarget member, what kind of click
|
||||
click_target: A usertypes.ClickTarget member, what kind of click
|
||||
to simulate.
|
||||
force_event: Force generating a fake mouse event.
|
||||
"""
|
||||
|
@ -25,7 +25,7 @@
|
||||
from PyQt5.QtCore import QRect, Qt, QPoint
|
||||
from PyQt5.QtGui import QMouseEvent
|
||||
|
||||
from qutebrowser.utils import log, javascript, usertypes
|
||||
from qutebrowser.utils import log, javascript
|
||||
from qutebrowser.browser import webelem
|
||||
|
||||
|
||||
@ -153,9 +153,14 @@ class WebEngineElement(webelem.AbstractWebElement):
|
||||
|
||||
def _click_editable(self):
|
||||
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-58515
|
||||
# pylint doesn't know about Qt.MouseEventSynthesizedBySystem
|
||||
# because it was added in Qt 5.6, but we can be sure we use that with
|
||||
# QtWebEngine.
|
||||
# pylint: disable=no-member
|
||||
ev = QMouseEvent(QMouseEvent.MouseButtonPress, QPoint(0, 0),
|
||||
QPoint(0, 0), QPoint(0, 0), Qt.NoButton, Qt.NoButton,
|
||||
Qt.NoModifier, Qt.MouseEventSynthesizedBySystem)
|
||||
# pylint: enable=no-member
|
||||
self._tab.send_event(ev)
|
||||
# This actually "clicks" the element by calling focus() on it in JS.
|
||||
js_code = javascript.assemble('webelem', 'focus', self._id)
|
||||
|
@ -27,7 +27,7 @@ import functools
|
||||
from PyQt5.QtCore import pyqtSlot, Qt, QEvent, QPoint, QUrl, QTimer
|
||||
from PyQt5.QtGui import QKeyEvent, QIcon
|
||||
# pylint: disable=no-name-in-module,import-error,useless-suppression
|
||||
from PyQt5.QtWidgets import QOpenGLWidget, QApplication
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt5.QtWebEngineWidgets import (QWebEnginePage, QWebEngineScript,
|
||||
QWebEngineProfile)
|
||||
# pylint: enable=no-name-in-module,import-error,useless-suppression
|
||||
|
@ -218,7 +218,8 @@ class QuteProc(testprocess.Process):
|
||||
log_line.waited_for = True
|
||||
self._is_ready('load')
|
||||
elif log_line.category == 'misc' and any(testutils.pattern_match(
|
||||
pattern=pattern, value=log_line.message) for pattern in start_okay_messages_focus):
|
||||
pattern=pattern, value=log_line.message) for pattern in
|
||||
start_okay_messages_focus):
|
||||
self._is_ready('focus')
|
||||
elif (log_line.category == 'init' and
|
||||
log_line.module == 'standarddir' and
|
||||
|
Loading…
Reference in New Issue
Block a user