Don't return values from events.

This commit is contained in:
Florian Bruhin 2014-06-22 23:37:16 +02:00
parent 8f85149c96
commit 9668994046
2 changed files with 5 additions and 5 deletions

View File

@ -129,10 +129,10 @@ class TabBar(QTabBar):
def mousePressEvent(self, e):
"""Override mousePressEvent to emit tabCloseRequested on rightclick."""
if e.button() != Qt.RightButton:
return super().mousePressEvent(e)
super().mousePressEvent(e)
idx = self.tabAt(e.pos())
if idx == -1:
return super().mousePressEvent(e)
super().mousePressEvent(e)
self.tabCloseRequested.emit(idx)
def tabSizeHint(self, index):

View File

@ -520,7 +520,7 @@ class WebView(QWebView):
self.scroll_pos = perc
self.scroll_pos_changed.emit(*perc)
# Let superclass handle the event
return super().paintEvent(e)
super().paintEvent(e)
def mousePressEvent(self, e):
"""Extend QWidget::mousePressEvent().
@ -539,7 +539,7 @@ class WebView(QWebView):
"""
if e.button() in (Qt.XButton1, Qt.XButton2):
self._mousepress_backforward(e)
return super().mousePressEvent(e)
super().mousePressEvent(e)
self._mousepress_insertmode(e)
self._mousepress_opentarget(e)
return super().mousePressEvent(e)
super().mousePressEvent(e)