COSMETIC: Improved transfer speed display in peers list

This commit is contained in:
Christophe Dumez
2010-01-22 00:03:27 +00:00
parent 89175ea827
commit ad47565b93
2 changed files with 3 additions and 1 deletions

View File

@@ -56,7 +56,8 @@ public:
case UP_SPEED:{
QItemDelegate::drawBackground(painter, opt, index);
double speed = index.data().toDouble();
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::number(speed/1024., 'f', 1)+" "+tr("KiB/s"));
if (speed > 0.0)
QItemDelegate::drawDisplay(painter, opt, opt.rect, misc::friendlyUnit(speed)+tr("/s", "/second (i.e. per second)"));
break;
}
case PROGRESS:{