3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
5
5
#include " recentrequeststablemodel.h"
6
- # include " guiutil.h "
6
+
7
7
#include " bitcoinunits.h"
8
+ #include " guiutil.h"
8
9
#include " optionsmodel.h"
9
10
10
- RecentRequestsTableModel::RecentRequestsTableModel (CWallet *wallet, WalletModel *parent):
11
+ RecentRequestsTableModel::RecentRequestsTableModel (CWallet *wallet, WalletModel *parent) :
11
12
walletModel(parent)
12
13
{
14
+ Q_UNUSED (wallet);
15
+
13
16
/* These columns must match the indices in the ColumnIndex enumeration */
14
17
columns << tr (" Date" ) << tr (" Label" ) << tr (" Message" ) << tr (" Amount" );
15
18
}
@@ -22,12 +25,14 @@ RecentRequestsTableModel::~RecentRequestsTableModel()
22
25
int RecentRequestsTableModel::rowCount (const QModelIndex &parent) const
23
26
{
24
27
Q_UNUSED (parent);
28
+
25
29
return list.length ();
26
30
}
27
31
28
32
int RecentRequestsTableModel::columnCount (const QModelIndex &parent) const
29
33
{
30
34
Q_UNUSED (parent);
35
+
31
36
return columns.length ();
32
37
}
33
38
@@ -88,12 +93,15 @@ QVariant RecentRequestsTableModel::headerData(int section, Qt::Orientation orien
88
93
89
94
QModelIndex RecentRequestsTableModel::index (int row, int column, const QModelIndex &parent) const
90
95
{
91
- return createIndex (row, column, 0 );
96
+ Q_UNUSED (parent);
97
+
98
+ return createIndex (row, column);
92
99
}
93
100
94
101
bool RecentRequestsTableModel::removeRows (int row, int count, const QModelIndex &parent)
95
102
{
96
103
Q_UNUSED (parent);
104
+
97
105
if (count > 0 && row >= 0 && (row+count) <= list.size ())
98
106
{
99
107
beginRemoveRows (parent, row, row + count - 1 );
0 commit comments