From 4137e5de5351fd02738ad19ce2e682e02a6cbb13 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 1 May 2014 23:25:51 +0200 Subject: [PATCH] Don't use QShortcut for space scrolling --- qutebrowser/config/configdata.py | 1 + qutebrowser/widgets/_tabbedbrowser.py | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 6cd3a43bb..9bf3630a9 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -503,6 +503,7 @@ DATA = OrderedDict([ ('', '${k}'), ('', '${j}'), ('', '${l}'), + ('', '${}'), )), ('keybind.insert', sect.ValueList( diff --git a/qutebrowser/widgets/_tabbedbrowser.py b/qutebrowser/widgets/_tabbedbrowser.py index 008877fbc..3ac9ec79a 100644 --- a/qutebrowser/widgets/_tabbedbrowser.py +++ b/qutebrowser/widgets/_tabbedbrowser.py @@ -20,8 +20,8 @@ import logging from functools import partial -from PyQt5.QtWidgets import QApplication, QShortcut, QSizePolicy -from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt +from PyQt5.QtWidgets import QApplication, QSizePolicy +from PyQt5.QtCore import pyqtSignal, pyqtSlot from PyQt5.QtGui import QClipboard import qutebrowser.utils.url as urlutils @@ -50,7 +50,6 @@ class TabbedBrowser(TabWidget): Attributes: _url_stack: Stack of URLs of closed tabs. - _space: Space QShortcut to avoid garbage collection _tabs: A list of open tabs. _filter: A SignalFilter instance. cur: A CurCommandDispatcher instance to dispatch commands to the @@ -95,10 +94,6 @@ class TabbedBrowser(TabWidget): self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self._tabs = [] self._url_stack = [] - self._space = QShortcut(self) - self._space.setKey(Qt.Key_Space) - self._space.setContext(Qt.WidgetWithChildrenShortcut) - self._space.activated.connect(lambda: self.cur.scroll_page(0, 1)) self._filter = SignalFilter(self) self.cur = CurCommandDispatcher(self)