From da11b159c22336278f769ae2d01d42473bb340df Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 21 Jul 2015 17:29:57 +0530 Subject: [PATCH] Remove no longer needed workaround for Qt bug https://bugreports.qt.io/browse/QTBUG-40938 --- src/calibre/gui2/library/views.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index d90bfc1c14..008721eec2 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -24,7 +24,7 @@ from calibre.gui2.library.alternate_views import AlternateViews, setup_dnd_inter from calibre.utils.config import tweaks, prefs from calibre.gui2 import error_dialog, gprefs, FunctionDispatcher from calibre.gui2.library import DEFAULT_SORT -from calibre.constants import filesystem_encoding, isosx +from calibre.constants import filesystem_encoding from calibre import force_unicode class HeaderView(QHeaderView): # {{{ @@ -1073,18 +1073,6 @@ class BooksView(QTableView): # {{{ def row_count(self): return self._model.count() - if isosx: - # Qt 5 item view handling of return key on OS X seems to be broken - # See https://bugreports.qt-project.org/browse/QTBUG-40938 - def keyPressEvent(self, ev): - if ev.key() in (Qt.Key_Enter, Qt.Key_Return) and self.state() != self.EditingState: - ci = self.currentIndex() - if ci.isValid() and ci.flags() & Qt.ItemIsEditable: - if self.edit(ci, self.EditKeyPressed, ev): - ev.accept() - return - return QTableView.keyPressEvent(self, ev) - # }}} class DeviceBooksView(BooksView): # {{{