Bug 240629 - Progress bar does not reach 100% but count does
Summary: Progress bar does not reach 100% but count does
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 18:47 UTC by Ian Neal
Modified: 2010-07-23 13:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
proposed patch (5.87 KB, patch)
2010-06-21 05:30 UTC, Vincent Ordy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Neal 2010-06-03 18:47:12 UTC
Version:           unspecified (using KDE 4.4.3) 
OS:                Linux

When loading a kmy file, the count goes up to 100% but the progress (the blue bit) in the progress bar does not reach 100% (i.e. fill the progress bar).

Reproducible: Always


Actual Results:  
Progress in progress bar only fills about 20% (if that) of the progress bar

Expected Results:  
Progress should reach 100% of the progress bar.
Comment 1 Vincent Ordy 2010-06-21 05:30:53 UTC
Created attachment 48176 [details]
proposed patch

- set progressbar value to 0 after a reset (reset() sets it to -1, which is invalid and cause this bug)
- increment the progressbar value only when appropriate.  Some elements like <budgets> do not initialize the progressbar, but the progressbar value was incremented => the value become greater than the maximum => the progressbar is reset by Qt.
- remove useless resets
Comment 2 Alvaro Soliverez 2010-06-21 05:42:53 UTC
Please submit via reviewboard so that everyone can easily review it.

Is the database storage affected by this too?
Comment 3 Vincent Ordy 2010-06-21 06:22:36 UTC
http://reviewboard.kde.org/r/4417/

I haven't tested with the database storage, but the code in mymoneystoragesql.cpp seems okay.  I'll test later.
Comment 4 Thomas Baumgart 2010-07-23 13:37:42 UTC
SVN commit 1153500 by tbaumgart:

Applied patch from http://reviewboard.kde.org/r/4417/ except the last hunk changing the KMyMoneyGeneralCombo and added a timeout logic to it.

BUG: 240629

 M  +19 -2     kmymoney.cpp  
 M  +2 -0      kmymoney.h  
 M  +22 -10    mymoney/storage/mymoneystoragesql.cpp  
 M  +23 -16    mymoney/storage/mymoneystoragexml.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1153500