File tree Expand file tree Collapse file tree 5 files changed +30
-12
lines changed Expand file tree Collapse file tree 5 files changed +30
-12
lines changed Original file line number Diff line number Diff line change @@ -177,13 +177,17 @@ AddressTableModel::~AddressTableModel()
177
177
178
178
int AddressTableModel::rowCount (const QModelIndex &parent) const
179
179
{
180
- Q_UNUSED (parent);
180
+ if (parent.isValid ()) {
181
+ return 0 ;
182
+ }
181
183
return priv->size ();
182
184
}
183
185
184
186
int AddressTableModel::columnCount (const QModelIndex &parent) const
185
187
{
186
- Q_UNUSED (parent);
188
+ if (parent.isValid ()) {
189
+ return 0 ;
190
+ }
187
191
return columns.length ();
188
192
}
189
193
Original file line number Diff line number Diff line change @@ -98,13 +98,17 @@ BanTableModel::~BanTableModel()
98
98
99
99
int BanTableModel::rowCount (const QModelIndex &parent) const
100
100
{
101
- Q_UNUSED (parent);
101
+ if (parent.isValid ()) {
102
+ return 0 ;
103
+ }
102
104
return priv->size ();
103
105
}
104
106
105
107
int BanTableModel::columnCount (const QModelIndex &parent) const
106
108
{
107
- Q_UNUSED (parent);
109
+ if (parent.isValid ()) {
110
+ return 0 ;
111
+ }
108
112
return columns.length ();
109
113
}
110
114
Original file line number Diff line number Diff line change @@ -134,13 +134,17 @@ void PeerTableModel::stopAutoRefresh()
134
134
135
135
int PeerTableModel::rowCount (const QModelIndex &parent) const
136
136
{
137
- Q_UNUSED (parent);
137
+ if (parent.isValid ()) {
138
+ return 0 ;
139
+ }
138
140
return priv->size ();
139
141
}
140
142
141
143
int PeerTableModel::columnCount (const QModelIndex &parent) const
142
144
{
143
- Q_UNUSED (parent);
145
+ if (parent.isValid ()) {
146
+ return 0 ;
147
+ }
144
148
return columns.length ();
145
149
}
146
150
Original file line number Diff line number Diff line change @@ -36,15 +36,17 @@ RecentRequestsTableModel::~RecentRequestsTableModel()
36
36
37
37
int RecentRequestsTableModel::rowCount (const QModelIndex &parent) const
38
38
{
39
- Q_UNUSED (parent);
40
-
39
+ if (parent.isValid ()) {
40
+ return 0 ;
41
+ }
41
42
return list.length ();
42
43
}
43
44
44
45
int RecentRequestsTableModel::columnCount (const QModelIndex &parent) const
45
46
{
46
- Q_UNUSED (parent);
47
-
47
+ if (parent.isValid ()) {
48
+ return 0 ;
49
+ }
48
50
return columns.length ();
49
51
}
50
52
Original file line number Diff line number Diff line change @@ -289,13 +289,17 @@ void TransactionTableModel::updateConfirmations()
289
289
290
290
int TransactionTableModel::rowCount (const QModelIndex &parent) const
291
291
{
292
- Q_UNUSED (parent);
292
+ if (parent.isValid ()) {
293
+ return 0 ;
294
+ }
293
295
return priv->size ();
294
296
}
295
297
296
298
int TransactionTableModel::columnCount (const QModelIndex &parent) const
297
299
{
298
- Q_UNUSED (parent);
300
+ if (parent.isValid ()) {
301
+ return 0 ;
302
+ }
299
303
return columns.length ();
300
304
}
301
305
You can’t perform that action at this time.
0 commit comments