diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-12-10 11:57:57 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-12-11 14:45:25 +0100 |
commit | 7df07b3f456958288fe6787be6bee503d5dbb034 (patch) | |
tree | ce37a92a2b1b10b55511d628b5bfd70fdc9835b7 /src/qt/recentrequeststablemodel.cpp | |
parent | 69127034c3018630d790ba462b070b9219c5d790 (diff) |
[Qt] fix RecentRequestsTableModel function ambiuguity
- fixes a compiler ambiguity error with ::createIndex() called in
RecentRequestsTableModel::index()
- also add some Q_UNUSED() macros
Diffstat (limited to 'src/qt/recentrequeststablemodel.cpp')
-rw-r--r-- | src/qt/recentrequeststablemodel.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp index 06f64af146..86c29dd02b 100644 --- a/src/qt/recentrequeststablemodel.cpp +++ b/src/qt/recentrequeststablemodel.cpp @@ -3,13 +3,16 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "recentrequeststablemodel.h" -#include "guiutil.h" + #include "bitcoinunits.h" +#include "guiutil.h" #include "optionsmodel.h" -RecentRequestsTableModel::RecentRequestsTableModel(CWallet *wallet, WalletModel *parent): +RecentRequestsTableModel::RecentRequestsTableModel(CWallet *wallet, WalletModel *parent) : walletModel(parent) { + Q_UNUSED(wallet); + /* These columns must match the indices in the ColumnIndex enumeration */ columns << tr("Date") << tr("Label") << tr("Message") << tr("Amount"); } @@ -22,12 +25,14 @@ RecentRequestsTableModel::~RecentRequestsTableModel() int RecentRequestsTableModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent); + return list.length(); } int RecentRequestsTableModel::columnCount(const QModelIndex &parent) const { Q_UNUSED(parent); + return columns.length(); } @@ -88,12 +93,15 @@ QVariant RecentRequestsTableModel::headerData(int section, Qt::Orientation orien QModelIndex RecentRequestsTableModel::index(int row, int column, const QModelIndex &parent) const { - return createIndex(row, column, 0); + Q_UNUSED(parent); + + return createIndex(row, column); } bool RecentRequestsTableModel::removeRows(int row, int count, const QModelIndex &parent) { Q_UNUSED(parent); + if(count > 0 && row >= 0 && (row+count) <= list.size()) { beginRemoveRows(parent, row, row + count - 1); |