mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-03 11:00:14 -05:00
made number of active transsfers more relevant
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4011 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dec7a36835
commit
42661d6571
@ -778,14 +778,13 @@ void TransfersDialog::insertTransfers()
|
||||
double fileDlspeed = (info.downloadStatus==FT_STATE_DOWNLOADING)?(info.tfRate * 1024.0):0.0;
|
||||
|
||||
/* get the sources (number of online peers) */
|
||||
int online = 0;
|
||||
int active = 0;
|
||||
std::list<TransferInfo>::iterator pit;
|
||||
for (pit = info.peers.begin(); pit != info.peers.end(); pit++) {
|
||||
if (std::find(onlineIds.begin(), onlineIds.end(), pit->peerId) != onlineIds.end()) {
|
||||
online++;
|
||||
}
|
||||
}
|
||||
QString sources = QString("%1 (%2)").arg(online).arg(info.peers.size());
|
||||
for (pit = info.peers.begin(); pit != info.peers.end(); pit++)
|
||||
if(pit->tfRate > 0 && info.downloadStatus==FT_STATE_DOWNLOADING)
|
||||
active++;
|
||||
|
||||
QString sources = QString("%1 (%2)").arg(active).arg(info.peers.size());
|
||||
|
||||
QString status;
|
||||
switch (info.downloadStatus) {
|
||||
@ -1528,7 +1527,7 @@ QString TransfersDialog::getStatus(int row, QStandardItemModel *model)
|
||||
|
||||
QString TransfersDialog::getID(int row, QStandardItemModel *model)
|
||||
{
|
||||
return model->data(model->index(row, ID), Qt::DisplayRole).toString();
|
||||
return model->data(model->index(row, ID), Qt::DisplayRole).toString().left(40); // gets only the "hash" part of the name
|
||||
}
|
||||
|
||||
QString TransfersDialog::getPriority(int row, QStandardItemModel *model)
|
||||
|
Loading…
x
Reference in New Issue
Block a user