Bug 180132

Summary: Remaining download time does not get refreshed
Product: [Applications] kget Reporter: Volkmar Wörner <volkmar.woerner+KDE>
Component: generalAssignee: KGet authors <kget>
Status: RESOLVED FIXED    
Severity: normal CC: oasalonen
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot
patch for kget/core/transfertreemodel.cpp

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