added chunk request info, and chunk download info. Corrected bug displaying speed for stalled transfers. Warning: needs full recompilation

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3935 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-12-26 10:58:02 +00:00
parent 304bbf55cf
commit 40efe19efa
7 changed files with 69 additions and 29 deletions

View file

@ -775,7 +775,7 @@ void TransfersDialog::insertTransfers()
QString fileName = QString::fromUtf8(info.fname.c_str());
QString fileHash = QString::fromStdString(info.hash);
qlonglong fileSize = info.size;
double fileDlspeed = (info.downloadStatus==FT_STATE_PAUSED)?0.0:(info.tfRate * 1024.0);
double fileDlspeed = (info.downloadStatus==FT_STATE_DOWNLOADING)?(info.tfRate * 1024.0):0.0;
/* get the sources (number of online peers) */
int online = 0;
@ -827,6 +827,9 @@ void TransfersDialog::insertTransfers()
pinfo.progress = (info.size==0)?0:(completed*100.0/info.size) ;
pinfo.nb_chunks = pinfo.cmap._map.empty()?0:fcinfo.chunks.size() ;
for(uint32_t i=0;i<fcinfo.active_chunks.size();++i)
pinfo.chunks_in_progress.push_back(fcinfo.active_chunks[i].first) ;
int addedRow = addItem("", fileName, fileHash, fileSize, pinfo, fileDlspeed, sources, status, priority, completed, remaining, downloadtime);
used_hashes.insert(info.hash) ;