[Kmymoney-devel] work on models

Cristian Oneţ onet.cristian at gmail.com
Tue Feb 16 08:51:32 CET 2010

On Tue, Feb 16, 2010 at 1:46 AM, Ian Neal
<iann_bugzilla at blueyonder.co.uk> wrote:
>  Cristian Oneţ wrote:
>> Hi,
>> I've just committed a big patch that prepares the porting of the account
>> tree
>> to the model view framework. The code is not used yet (besides the account
>> selector) since I still need to make some minor adjustments but if you
>> would
>> like to give it a try and help me spot some possible problems here is the
>> patch that adds the committed accounts view above the old accounts view so
>> they can be compared side by side. I would appreciate it if you would give
>> it
>> a try before I do the actual replacement.
>> Thanks!
> I noticed that in part of the big patch you have in
> kmymoney/models/accountsmodel.cpp, addAcountGroup function, lots of
> invalidateFilter(); statements at the end of each set of d->m_typelist
> statements, can there not just be one invalidateFilter(); statement at the
> end of the function or is there the chance that the function can be passed
> an accountTypeE that isn't captured by the various if statements?
> Would a select/case structure work better than multiple ifs?
Well I wanted to call invalidate filter only if the filtering criteria
was really changed but I guess that in the current state of the code
invalidate could also be called even if the criteria does not change
so I'll just call one invalidate at the end of the function to make it
more readable.

More information about the KMyMoney-devel mailing list