Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

status: pass parent through model initializer

Changeset 4a6cc367186c

Parent 48298f8c38f2

by Steve Borho

Changes to one file · Browse files at 4a6cc367186c Showing diff from parent 48298f8c38f2 Diff from another changeset...

 
120
121
122
123
124
125
 
 
 
126
127
128
 
161
162
163
164
165
166
167
168
 
120
121
122
 
 
 
123
124
125
126
127
128
 
161
162
163
 
 
164
165
166
@@ -120,9 +120,9 @@
     class WctxModel(QAbstractTableModel): - def __init__(self, wctx): - QAbstractTableModel.__init__(self) - data = [] + def __init__(self, wctx, parent=None): + QAbstractTableModel.__init__(self, parent) + rows = []   for m in wctx.modified():   rows.append(('M', m))   for a in wctx.added(): @@ -161,8 +161,6 @@
  def headerData(self, col, orientation, role):   if role != Qt.DisplayRole or orientation != Qt.Horizontal:   return QVariant() - elif col >= len(self.headers): - return QVariant()   else:   return QVariant(self.headers[col])