62 offset = self.__sourceDateRow(index.row()) |
62 offset = self.__sourceDateRow(index.row()) |
63 if index.column() == 0: |
63 if index.column() == 0: |
64 idx = self.sourceModel().index(offset, 0) |
64 idx = self.sourceModel().index(offset, 0) |
65 date = idx.data(HistoryModel.DateRole) |
65 date = idx.data(HistoryModel.DateRole) |
66 if date == QDate.currentDate(): |
66 if date == QDate.currentDate(): |
67 return self.trUtf8("Earlier Today") |
67 return self.tr("Earlier Today") |
68 return date.toString("yyyy-MM-dd") |
68 return date.toString("yyyy-MM-dd") |
69 if index.column() == 1: |
69 if index.column() == 1: |
70 return self.trUtf8( |
70 return self.tr( |
71 "%n item(s)", "", |
71 "%n item(s)", "", |
72 self.rowCount(index.sibling(index.row(), 0))) |
72 self.rowCount(index.sibling(index.row(), 0))) |
73 |
73 |
74 elif role == Qt.DecorationRole: |
74 elif role == Qt.DecorationRole: |
75 if index.column() == 0 and not index.parent().isValid(): |
75 if index.column() == 0 and not index.parent().isValid(): |