mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 17:09:34 -05:00
fixed wrong file count in RsCollectionDialog when downloading files
This commit is contained in:
parent
b3653d1283
commit
e1ad21c357
@ -39,7 +39,7 @@
|
||||
static const uint32_t SOURCE_CHUNK_MAP_UPDATE_PERIOD = 60 ; //! TTL for chunkmap info
|
||||
static const uint32_t INACTIVE_CHUNK_TIME_LAPSE = 3600 ; //! TTL for an inactive chunk
|
||||
static const uint32_t FT_CHUNKMAP_MAX_CHUNK_JUMP = 50 ; //! Maximum chunk jump in progressive DL mode
|
||||
static const uint32_t FT_CHUNKMAP_MAX_SLICE_REASK_DELAY = 10 ; //! Maximum chunk jump in progressive DL mode
|
||||
static const uint32_t FT_CHUNKMAP_MAX_SLICE_REASK_DELAY = 10 ; //! Maximum time to re-ask a slice to another peer at end of transfer
|
||||
|
||||
std::ostream& operator<<(std::ostream& o,const ftChunk& c)
|
||||
{
|
||||
|
@ -639,8 +639,17 @@ void RsCollectionDialog::directoryLoaded(QString dirLoaded)
|
||||
*/
|
||||
void RsCollectionDialog::updateSizes()
|
||||
{
|
||||
ui._selectedFiles_TL->setText(QString::number(getRootItem()->data(COLUMN_FILEC,ROLE_SELFILEC).toULongLong())) ;
|
||||
ui._totalSize_TL->setText(misc::friendlyUnit(getRootItem()->data(COLUMN_SIZE,ROLE_SELSIZE).toULongLong())) ;
|
||||
uint64_t total_size = 0 ;
|
||||
uint32_t total_count = 0 ;
|
||||
|
||||
for(uint32_t i=0;i<ui._fileEntriesTW->topLevelItemCount();++i)
|
||||
{
|
||||
total_size += ui._fileEntriesTW->topLevelItem(i)->data(COLUMN_SIZE ,ROLE_SELSIZE ).toULongLong();
|
||||
total_count += ui._fileEntriesTW->topLevelItem(i)->data(COLUMN_FILEC,ROLE_SELFILEC).toULongLong();
|
||||
}
|
||||
|
||||
ui._selectedFiles_TL->setText(QString::number(total_count));
|
||||
ui._totalSize_TL->setText(misc::friendlyUnit(total_size));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user