2015-09-14 17:13 GMT+02:00 Igor Mironchik :
> Hi,
>
> it seems that problem not in the iterating and deletion from cantainer...
Yes it is. As Andre told you, erasing from the list invalidates
iterators, including the one returned by end(). As you cache the "end"
iterator in the "last" variable at
Look in while statement
9/14/2015 6:28 PM, Croitor Alexandru пишет:
The documentation for QList::erase says:
-- Removes the item associated with the iterator /pos/ from the list,
and returns an iterator to the next item in the list (which may be end
()).
Documentation for iterator::oper
The documentation for QList::erase says:
-- Removes the item associated with the iterator *pos* from the list, and
returns an iterator to the next item in the list (which may be end
()).
Documentation for iterator::operator++() says:
Calling this function on QList::end
()
leads to undefined res
On 09/14/2015 11:13 AM, Igor Mironchik wrote:
> Hi,
>
> it seems that problem not in the iterating and deletion from cantainer...
>
> I wrote simple test app and everything is ok.
>
> But something here crashes my app and only in release mode, so I can't
> understand what is the problem...
>
> And
Hi,
it seems that problem not in the iterating and deletion from cantainer...
I wrote simple test app and everything is ok.
But something here crashes my app and only in release mode, so I can't
understand what is the problem...
And ideas?
9/14/2015 6:06 PM, André Somers пишет:
> Op 14-9-2015
Op 14-9-2015 om 16:57 schreef Igor Mironchik:
> Hi,
>
> I ran into this problem...
>
> void
> ImageFilesStoragePrivate::removeAllImages(
> QList< ImageRecord > & images,
> ImageFilesStorage::ImageType type )
> {
> QList< ImageRecord >::Iterator it = images.begin();
> QList<