Bug 240629

Summary: Progress bar does not reach 100% but count does
Product: [Applications] kmymoney Reporter: Ian Neal <iann_bugzilla>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: vincent
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: proposed patch

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