[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: strange bug with QList
From: Igor Janssen <rm () linux ! ru ! net>
Date: 2001-06-22 11:41:00
[Download RAW message or body]
On 22 June 2001 16:54, David Faure wrote:
>
> This can happen if you are iterating over a temporary QList, for instance
> QList<GObject> objects() { return m_objects; }
> [...]
> QListIterator<GObject>( thatClass->objects() );
> ....
>
> This creates an iterator over a temporary object -> bad.
> The fix is obviously to change it into a reference:
> const QList<GObject> & objects() { return m_objects; }
QList is defined at class and it used from different methods of that class.
It contains for example all selected objects of page or all layers of page.
--
RM (rm@linux.ru.net)
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic