[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:
Philip Kaufmann
2015-06-26 14:55:52 +02:00
committed by Jonas Schnelli
parent cdd72cd5fb
commit 51654deff2
3 changed files with 22 additions and 27 deletions

View File

@@ -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();