mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 23:07:59 +01:00
qt, refactor: Use default arguments for overridden functions
See Qt docs for QAbstractTableModel and QAbstractItemModel classes.
This commit is contained in:
parent
ea1e5c2c71
commit
efb7e5aa96
2 changed files with 9 additions and 9 deletions
|
@ -84,7 +84,7 @@ void PeerTableModel::stopAutoRefresh()
|
||||||
timer->stop();
|
timer->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
int PeerTableModel::rowCount(const QModelIndex &parent) const
|
int PeerTableModel::rowCount(const QModelIndex& parent) const
|
||||||
{
|
{
|
||||||
if (parent.isValid()) {
|
if (parent.isValid()) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -92,7 +92,7 @@ int PeerTableModel::rowCount(const QModelIndex &parent) const
|
||||||
return priv->size();
|
return priv->size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int PeerTableModel::columnCount(const QModelIndex &parent) const
|
int PeerTableModel::columnCount(const QModelIndex& parent) const
|
||||||
{
|
{
|
||||||
if (parent.isValid()) {
|
if (parent.isValid()) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -100,7 +100,7 @@ int PeerTableModel::columnCount(const QModelIndex &parent) const
|
||||||
return columns.length();
|
return columns.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant PeerTableModel::data(const QModelIndex &index, int role) const
|
QVariant PeerTableModel::data(const QModelIndex& index, int role) const
|
||||||
{
|
{
|
||||||
if(!index.isValid())
|
if(!index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
@ -172,7 +172,7 @@ Qt::ItemFlags PeerTableModel::flags(const QModelIndex &index) const
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex PeerTableModel::index(int row, int column, const QModelIndex &parent) const
|
QModelIndex PeerTableModel::index(int row, int column, const QModelIndex& parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
Q_UNUSED(parent);
|
||||||
CNodeCombinedStats *data = priv->index(row);
|
CNodeCombinedStats *data = priv->index(row);
|
||||||
|
|
|
@ -61,11 +61,11 @@ public:
|
||||||
|
|
||||||
/** @name Methods overridden from QAbstractTableModel
|
/** @name Methods overridden from QAbstractTableModel
|
||||||
@{*/
|
@{*/
|
||||||
int rowCount(const QModelIndex &parent) const override;
|
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
int columnCount(const QModelIndex &parent) const override;
|
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||||
QVariant data(const QModelIndex &index, int role) const override;
|
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
|
||||||
QModelIndex index(int row, int column, const QModelIndex &parent) const override;
|
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue