mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 05:13:30 -07:00
Code clean up
This commit is contained in:
parent
2de4c50d4f
commit
d5898f024d
3 changed files with 8 additions and 20 deletions
|
@ -73,11 +73,10 @@ public:
|
|||
}
|
||||
case TorrentModelItem::TR_SEEDS:
|
||||
case TorrentModelItem::TR_PEERS: {
|
||||
const qulonglong tot_val = index.data().toULongLong();
|
||||
QString display = QString::number((qulonglong)tot_val/1000000);
|
||||
if(tot_val%2 == 0) {
|
||||
QString display = QString::number(index.data().toLongLong());
|
||||
if(index.data(Qt::UserRole).toLongLong() > 0) {
|
||||
// Scrape was successful, we have total values
|
||||
display += " ("+QString::number((qulonglong)(tot_val%1000000)/10)+")";
|
||||
display += " ("+QString::number(index.data(Qt::UserRole).toLongLong())+")";
|
||||
}
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
opt.displayAlignment = Qt::AlignRight;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue