1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-03-20 06:11:39 +00:00

Implemented super() inheritance style suggested by PyQt5

This commit is contained in:
Virgil Dupras
2013-10-20 15:53:59 -04:00
parent 664d630b96
commit 5a8cb6f5e3
25 changed files with 65 additions and 66 deletions

View File

@@ -13,9 +13,9 @@ from PyQt5.QtWidgets import QTableView
from qtlib.table import Table
class ResultsModel(Table):
def __init__(self, app, view):
def __init__(self, app, view, **kwargs):
model = app.model.result_table
Table.__init__(self, model, view)
super().__init__(model, view, **kwargs)
view.horizontalHeader().setSortIndicator(1, Qt.AscendingOrder)
app.prefsChanged.connect(self.appPrefsChanged)
@@ -109,7 +109,7 @@ class ResultsView(QTableView):
if event.text() == ' ':
self.spacePressed.emit()
return
QTableView.keyPressEvent(self, event)
super().keyPressEvent(event)
def mouseDoubleClickEvent(self, event):
self.doubleClicked.emit(None)