mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
qt: Follow Qt docs when implementing rowCount and columnCount
This commit is contained in:
parent
ae8f797135
commit
195fcb53a0
5 changed files with 30 additions and 12 deletions
|
@ -177,13 +177,17 @@ AddressTableModel::~AddressTableModel()
|
|||
|
||||
int AddressTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if (parent.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
return priv->size();
|
||||
}
|
||||
|
||||
int AddressTableModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if (parent.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
return columns.length();
|
||||
}
|
||||
|
||||
|
|
|
@ -98,13 +98,17 @@ BanTableModel::~BanTableModel()
|
|||
|
||||
int BanTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if (parent.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
return priv->size();
|
||||
}
|
||||
|
||||
int BanTableModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if (parent.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
return columns.length();
|
||||
}
|
||||
|
||||
|
|
|
@ -134,13 +134,17 @@ void PeerTableModel::stopAutoRefresh()
|
|||
|
||||
int PeerTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if (parent.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
return priv->size();
|
||||
}
|
||||
|
||||
int PeerTableModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
if (parent.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
return columns.length();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,15 +36,17 @@ RecentRequestsTableModel::~RecentRequestsTableModel()
|
|||
|
||||
int RecentRequestsTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
if (parent.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
return list.length();
|
||||
}
|
||||
|
||||
int RecentRequestsTableModel::columnCount(const QModelIndex &parent) const
|
||||
{
|
||||
Q_UNUSED(parent);
|
||||
|
||||
if (parent.isValid()) {
|
||||
return 0;
|
||||
}
|
||||
return columns.length();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue