Bug 180132 - Remaining download time does not get refreshed
Summary: Remaining download time does not get refreshed
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-09 14:23 UTC by Volkmar Wörner
Modified: 2009-01-11 02:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (18.79 KB, image/png)
2009-01-09 14:25 UTC, Volkmar Wörner
Details
patch for kget/core/transfertreemodel.cpp (797 bytes, patch)
2009-01-09 21:36 UTC, Olli Salonen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volkmar Wörner 2009-01-09 14:23:45 UTC
Version:           2.2.60 (using Devel)
OS:                Linux
Installed from:    Compiled sources

During a download, the remaining download time does not get updated, even if the download is finished or a new one is started.
Comment 1 Volkmar Wörner 2009-01-09 14:25:04 UTC
Created attachment 30050 [details]
Screenshot
Comment 2 Olli Salonen 2009-01-09 21:36:31 UTC
Created attachment 30076 [details]
patch for kget/core/transfertreemodel.cpp

The patch fixes the remaining time shown after finishing the download.

The problem seems to be with handling the remaining time updates in general in the transfer view. They are updated after long, random (>10 seconds) intervals, but the patch changes this to the 500 ms interval as it is for the data in other columns.

It is a result of TransferTreeModel::timerEvent() not updating the RemainingTime column, because it tries to match the column with changes to TransferChange::Tc_UploadSpeed. The columns do not "respect the Models column order" as commented in core/transfer.h, as far as I understood it.
Comment 3 Lukas Appelhans 2009-01-11 01:22:11 UTC
SVN commit 909105 by lappelhans:

Add comments, make some code more readable, also fix the remaining time not updated correctly

BUG:180132


 M  +3 -0      transfer.cpp  
 M  +11 -10    transfer.h  
 M  +3 -3      transfertreemodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=909105
Comment 4 Lukas Appelhans 2009-01-11 02:31:24 UTC
@Olli: Hey, about your patch:
I think it's the wrong way to implement it, the updates in the View are based on top of the changes-flags, so in my fix I added a new one and pass it when the DownloadedSize and Status changed (same as in your patch)...

Thanks for your work anyway :)

Lukas