mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
qt: Follow Qt docs when implementing rowCount and columnCount
This commit is contained in:
@ -177,13 +177,17 @@ AddressTableModel::~AddressTableModel()
|
|||||||
|
|
||||||
int AddressTableModel::rowCount(const QModelIndex &parent) const
|
int AddressTableModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return priv->size();
|
return priv->size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int AddressTableModel::columnCount(const QModelIndex &parent) const
|
int AddressTableModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return columns.length();
|
return columns.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,13 +98,17 @@ BanTableModel::~BanTableModel()
|
|||||||
|
|
||||||
int BanTableModel::rowCount(const QModelIndex &parent) const
|
int BanTableModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return priv->size();
|
return priv->size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int BanTableModel::columnCount(const QModelIndex &parent) const
|
int BanTableModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return columns.length();
|
return columns.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,13 +134,17 @@ void PeerTableModel::stopAutoRefresh()
|
|||||||
|
|
||||||
int PeerTableModel::rowCount(const QModelIndex &parent) const
|
int PeerTableModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return priv->size();
|
return priv->size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int PeerTableModel::columnCount(const QModelIndex &parent) const
|
int PeerTableModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return columns.length();
|
return columns.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,15 +36,17 @@ RecentRequestsTableModel::~RecentRequestsTableModel()
|
|||||||
|
|
||||||
int RecentRequestsTableModel::rowCount(const QModelIndex &parent) const
|
int RecentRequestsTableModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return list.length();
|
return list.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
int RecentRequestsTableModel::columnCount(const QModelIndex &parent) const
|
int RecentRequestsTableModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return columns.length();
|
return columns.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,13 +289,17 @@ void TransactionTableModel::updateConfirmations()
|
|||||||
|
|
||||||
int TransactionTableModel::rowCount(const QModelIndex &parent) const
|
int TransactionTableModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return priv->size();
|
return priv->size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int TransactionTableModel::columnCount(const QModelIndex &parent) const
|
int TransactionTableModel::columnCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
if (parent.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return columns.length();
|
return columns.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user