diff options
| author | Philip Kaufmann <[email protected]> | 2015-06-23 21:10:42 +0200 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2015-09-16 16:50:19 +0200 |
| commit | 9e521c173586257f57764b479beb5923c33ed0eb (patch) | |
| tree | 8a83ab4b363cfadfa8738b99ead769e3e0797945 /src/qt/bantablemodel.cpp | |
| parent | net: use CIDR notation in CSubNet::ToString() (diff) | |
| download | discoin-9e521c173586257f57764b479beb5923c33ed0eb.tar.xz discoin-9e521c173586257f57764b479beb5923c33ed0eb.zip | |
[Qt] polish ban table
Diffstat (limited to 'src/qt/bantablemodel.cpp')
| -rw-r--r-- | src/qt/bantablemodel.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index b4b100bf5..1ef120ccf 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -56,11 +56,10 @@ public: CCombinedBan *index(int idx) { - if(idx >= 0 && idx < cachedBanlist.size()) { + if (idx >= 0 && idx < cachedBanlist.size()) return &cachedBanlist[idx]; - } else { - return 0; - } + + return 0; } }; @@ -124,7 +123,7 @@ QVariant BanTableModel::data(const QModelIndex &index, int role) const } } else if (role == Qt::TextAlignmentRole) { if (index.column() == Bantime) - return (int)(Qt::AlignRight | Qt::AlignVCenter); + return (QVariant)(Qt::AlignRight | Qt::AlignVCenter); } return QVariant(); @@ -157,13 +156,8 @@ QModelIndex BanTableModel::index(int row, int column, const QModelIndex &parent) CCombinedBan *data = priv->index(row); if (data) - { return createIndex(row, column, data); - } - else - { - return QModelIndex(); - } + return QModelIndex(); } void BanTableModel::refresh() |