Bug 317792 - Improve the download progress API
Summary: Improve the download progress API
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.6 (KDE 4.11)
Platform: Other Linux
: NOR task
Target Milestone: ---
Assignee: Abhinav Gangwar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-03 17:39 UTC by Dennis Nienhüser
Modified: 2014-02-26 20:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Nienhüser 2013-04-03 17:39:46 UTC
Currently jobs added to and removed from the download queue when downloading map tile images fire a jobAdded and jobRemoved signal, respectively. These signals are used to report download progress in the progress dialog and download progress float item. There are two problems:
- Some signals seem to be missing, maybe when downloads time out. This means that at times the progress report is not accurate
- The signal/slot connections depend on the visibility of the progress report widget. If the queue is not empty when the progress report widget becomes visible, the progress report is not accurate

To fix this, add a new signal like downloadProgressChanged(int done, int running, int queued). Maintain the associated counts (including setting done to 0 at appropriate times, e.g. when running and queued are 0). Connect the progress report widgets to the new signal. Make sure that the download progress report in the progress bar behaves in a sane way.
Comment 1 Abhinav Gangwar 2014-02-25 17:52:44 UTC
I want to work on this task
Comment 2 Dennis Nienhüser 2014-02-26 08:07:56 UTC
An appropriate signal progressChanged( int active, int queued ) was added in the meantime and can be used for this task. It is used in ProgressFloatItem. The remaining work here is to change marble_part.cpp and QtMainWindow.cpp to use it as well (instead of jobAdded and jobRemoved).
Comment 3 Dennis Nienhüser 2014-02-26 20:31:02 UTC
Git commit 61bcb6c0fc881e5277d18294eaef9ede3b9197a3 by Dennis Nienhüser, on behalf of Abhinav Gangwar.
Committed on 26/02/2014 at 20:29.
Pushed by nienhueser into branch 'master'.

Use improved download progress API
REVIEW: 116100

M  +5    -5    src/apps/marble-kde/marble_part.cpp
M  +2    -2    src/apps/marble-kde/marble_part.h
M  +5    -5    src/apps/marble-qt/QtMainWindow.cpp
M  +2    -2    src/apps/marble-qt/QtMainWindow.h

http://commits.kde.org/marble/61bcb6c0fc881e5277d18294eaef9ede3b9197a3