mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-13 22:24:05 +01:00
[Qt] bantable polish
- add missing NULL pointer checks - add better comments and reorder some code in rpcconsole.cpp - remove unneeded leftovers in bantable.cpp - update bantable column sizes to prevent cutting of banned until
This commit is contained in:
committed by
Jonas Schnelli
parent
cdd72cd5fb
commit
51654deff2
@@ -14,8 +14,6 @@
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/date_time/c_local_time_adjustor.hpp>
|
||||
|
||||
// private implementation
|
||||
class BanTablePriv
|
||||
@@ -38,7 +36,6 @@ public:
|
||||
#if QT_VERSION >= 0x040700
|
||||
cachedBanlist.reserve(banMap.size());
|
||||
#endif
|
||||
std::map<CSubNet, int64_t>::iterator iter;
|
||||
foreach (const PAIRTYPE(CSubNet, int64_t)& banentry, banMap)
|
||||
{
|
||||
CCombinedBan banEntry;
|
||||
@@ -104,9 +101,6 @@ QVariant BanTableModel::data(const QModelIndex &index, int role) const
|
||||
date = date.addSecs(rec->bantil);
|
||||
return date.toString(Qt::SystemLocaleLongDate);
|
||||
}
|
||||
} else if (role == Qt::TextAlignmentRole) {
|
||||
if (index.column() == Bantime)
|
||||
return (QVariant)(Qt::AlignRight | Qt::AlignVCenter);
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
|
||||
Reference in New Issue
Block a user