Helpviewer/History/HistoryModel.py

changeset 2126
3744863a534e
parent 2081
b7ccd563eeb6
child 2302
f29e9405c851
equal deleted inserted replaced
2124:909d55803dd6 2126:3744863a534e
5 5
6 """ 6 """
7 Module implementing the history model. 7 Module implementing the history model.
8 """ 8 """
9 9
10 from PyQt4.QtCore import Qt, QAbstractTableModel, QModelIndex, QUrl, qVersion 10 from PyQt4.QtCore import Qt, QAbstractTableModel, QModelIndex, QUrl
11 11
12 import Helpviewer.HelpWindow 12 import Helpviewer.HelpWindow
13 13
14 14
15 class HistoryModel(QAbstractTableModel): 15 class HistoryModel(QAbstractTableModel):
62 Public slot to handle the update of a history entry. 62 Public slot to handle the update of a history entry.
63 63
64 @param row row number of the updated entry (integer) 64 @param row row number of the updated entry (integer)
65 """ 65 """
66 idx = self.index(row, 0) 66 idx = self.index(row, 0)
67 if qVersion() >= "5.0.0": 67 self.dataChanged.emit(idx, idx)
68 self.dataChanged.emit(idx, idx, [])
69 else:
70 self.dataChanged.emit(idx, idx)
71 68
72 def headerData(self, section, orientation, role=Qt.DisplayRole): 69 def headerData(self, section, orientation, role=Qt.DisplayRole):
73 """ 70 """
74 Public method to get the header data. 71 Public method to get the header data.
75 72

eric ide

mercurial