« 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 asoliverez@gmail.com :: Rate this Message:

Reply to Author | View in Thread



On Tue, Jun 30, 2009 at 3:58 AM, Cristian Oneţ <onet.cristian@...> wrote:
On Tue, Jun 30, 2009 at 8:09 AM, Thomas Baumgart<thb@...> wrote:
> Does this also apply for the Qt3 version? I am not sure, why it should fail on
> Qt3. Can someone literate explain?
After investigating a bit it seems that on the Qt3 version there is no
problem since QValueList is used and QValueList::erase(it) has the
following behavior (quote from the API doc): "No iterators other than
'it' or other iterators pointing at the same item as 'it' are
invalidated". But on Qt4 version QList is used and "iterators to a
QList can become invalid after any insertion or removal". According to
http://doc.trolltech.com/4.3/containers.html#container-classes we need
QLinked list in Qt4 if we are to keep the code the way it is.

Sorry for the false alarm.

Ok, then make the change. It is better to use QList than QLinkedList.
We will have to go through similar cases in the code where we erase using the iterator.

Regards,
Alvaro

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

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

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