aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiontablemodel.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-01-02 21:40:53 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-01-02 21:40:53 +0200
commit195fcb53a09e9b852544778a077727f81d31303e (patch)
treed92cd1366d9ffd3e10802530169e4927e4549992 /src/qt/transactiontablemodel.cpp
parentae8f79713543d3db24a886cc27340b1570c2657d (diff)
downloadbitcoin-195fcb53a09e9b852544778a077727f81d31303e.tar.xz
qt: Follow Qt docs when implementing rowCount and columnCount
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r--src/qt/transactiontablemodel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index bb59b25d33..05b250eea9 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -289,13 +289,17 @@ void TransactionTableModel::updateConfirmations()
int TransactionTableModel::rowCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
+ if (parent.isValid()) {
+ return 0;
+ }
return priv->size();
}
int TransactionTableModel::columnCount(const QModelIndex &parent) const
{
- Q_UNUSED(parent);
+ if (parent.isValid()) {
+ return 0;
+ }
return columns.length();
}