Changeset View
Changeset View
Standalone View
Standalone View
src/qt/peertablemodel.cpp
Show All 29 Lines | bool NodeLessThan::operator()(const CNodeCombinedStats &left, | ||||
switch (column) { | switch (column) { | ||||
case PeerTableModel::NetNodeId: | case PeerTableModel::NetNodeId: | ||||
return pLeft->nodeid < pRight->nodeid; | return pLeft->nodeid < pRight->nodeid; | ||||
case PeerTableModel::Address: | case PeerTableModel::Address: | ||||
return pLeft->addrName.compare(pRight->addrName) < 0; | return pLeft->addrName.compare(pRight->addrName) < 0; | ||||
case PeerTableModel::Subversion: | case PeerTableModel::Subversion: | ||||
return pLeft->cleanSubVer.compare(pRight->cleanSubVer) < 0; | return pLeft->cleanSubVer.compare(pRight->cleanSubVer) < 0; | ||||
case PeerTableModel::Ping: | case PeerTableModel::Ping: | ||||
return pLeft->dMinPing < pRight->dMinPing; | return pLeft->m_min_ping_usec < pRight->m_min_ping_usec; | ||||
case PeerTableModel::Sent: | case PeerTableModel::Sent: | ||||
return pLeft->nSendBytes < pRight->nSendBytes; | return pLeft->nSendBytes < pRight->nSendBytes; | ||||
case PeerTableModel::Received: | case PeerTableModel::Received: | ||||
return pLeft->nRecvBytes < pRight->nRecvBytes; | return pLeft->nRecvBytes < pRight->nRecvBytes; | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | if (role == Qt::DisplayRole) { | ||||
switch (index.column()) { | switch (index.column()) { | ||||
case NetNodeId: | case NetNodeId: | ||||
return (qint64)rec->nodeStats.nodeid; | return (qint64)rec->nodeStats.nodeid; | ||||
case Address: | case Address: | ||||
return QString::fromStdString(rec->nodeStats.addrName); | return QString::fromStdString(rec->nodeStats.addrName); | ||||
case Subversion: | case Subversion: | ||||
return QString::fromStdString(rec->nodeStats.cleanSubVer); | return QString::fromStdString(rec->nodeStats.cleanSubVer); | ||||
case Ping: | case Ping: | ||||
return GUIUtil::formatPingTime(rec->nodeStats.dMinPing); | return GUIUtil::formatPingTime(rec->nodeStats.m_min_ping_usec); | ||||
case Sent: | case Sent: | ||||
return GUIUtil::formatBytes(rec->nodeStats.nSendBytes); | return GUIUtil::formatBytes(rec->nodeStats.nSendBytes); | ||||
case Received: | case Received: | ||||
return GUIUtil::formatBytes(rec->nodeStats.nRecvBytes); | return GUIUtil::formatBytes(rec->nodeStats.nRecvBytes); | ||||
} | } | ||||
} else if (role == Qt::TextAlignmentRole) { | } else if (role == Qt::TextAlignmentRole) { | ||||
switch (index.column()) { | switch (index.column()) { | ||||
case Ping: | case Ping: | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |