« Return to Thread: patch to fix iterators in khomeview (for kde4 version)

Re: patch to fix iterators in khomeview (for kde4 version)

by Bugzilla from onet.cristian@gmail.com :: Rate this Message:

Reply to Author | View in Thread

În data de Marți 30 Iunie 2009 08:09:42 Thomas Baumgart a scris:
> On Tuesday 30 June 2009 03:33:47 Alvaro Soliverez wrote:
> > Ok. I checked the patch. I had noticed the error but I had not figured
> > out why it was happening. Nice catch!
>
> Does this also apply for the Qt3 version? I am not sure, why it should fail
> on Qt3. Can someone literate explain?
Maybe it does not apply to Qt3 because of the implementation of QList::erase
on Qt3. But AFAIK iterators become invalid after changing the content of a
collection, unless specified otherwise. So "prevIt" became invalid after the
erase operation thus it could not be used to compare it to "it" (they become
incompatible).

> > We will have to check other similar iterators for the same problems.
> > Perhaps that's a problem in the Qt iterator template?
I don't think that it's a problem. I think that the collections assertions
were not respected. Maybe we can catch this at if we enable "iterator
debugging" (like in STL on win) on Debug if Qt4 has something like this.

> > The only comment I have about the patch is that the boolean should be
> > called removeAccount, we don't use Hungarian notation in KMM. The rest is
> > fine.
I'll note that

--
Regards,

Cristian Oneţ


------------------------------------------------------------------------------

_______________________________________________
KMyMoney2-developer mailing list
KMyMoney2-developer@...
https://lists.sourceforge.net/lists/listinfo/kmymoney2-developer

signature.asc (205 bytes) Download Attachment

 « Return to Thread: patch to fix iterators in khomeview (for kde4 version)