[Kmymoney-devel] porting the widgets to the qt model/view framework

Cristian Oneţ onet.cristian at gmail.com
Mon Jan 18 10:24:25 CET 2010


On Mon, Jan 18, 2010 at 11:11 AM, Thomas Baumgart <thb at net-bembel.de> wrote:
> On Sunday 17 January 2010 16:35:13 Cristian Oneţ wrote:
>> În data de Sîmbătă 16 Ianuarie 2010 12:44:36 Thomas Baumgart a scris:
>> > On Saturday 16 January 2010 00:52:46 Cristian Oneţ wrote:
>> > > În data de Sîmbătă 16 Ianuarie 2010 01:50:01 Alvaro Soliverez a scris:
>> > > > It was natural to happen. From what I have seen in the
>> > > > accountselector class, you should have a model that loads the account
>> > > > list as-is, then have a proxy model to sort/filter where you can move
>> > > > all the logic that is now happening in the accountselector class
>> > > > itself. That way, we can reuse the account model better.
>> > > > Eventually, I think we'll have models for every object in mymoney,
>> > > > plus proxy models for the specific logic of the views or widgets.
>> > >
>> > > You've read my thoughts :).
>> >
>> > So I see, that we have a very good common understanding about the design
>> > of this area. One model that might become a bit tricky is that for
>> > transactions/splits. After all, we want to prevent loading all of the
>> > information from the backend into the model.
>>
>> An initial implementation of the accounts model has been committed to SVN
>> toghether with a new account selector combo widget. The committed code is
>> not yet used in KMyMoney. I wanted to get your feedback before committing
>> the replacement of the old widget with the new one. I've attached a patch
>> that adds the new widget in the ledger, side by side with the old one, so
>> you can take a look at it.
>
> Did take a look at source code level. There's a potential memory leak in the
> patch: the proxy model and the model are never deleted (AFAICS), but
> loadView() is called many times (after each change of data in the engine
> while the view is visible or once after many changes when it becomes visible)
> during a run of KMyMoney. Just wanted to let you know.
Thanks for you observation, your are right the memory will be lost
until the widget is deleted that is when the view is destroyed :).


More information about the KMyMoney-devel mailing list