Hi,

I ran into this problem...

void
ImageFilesStoragePrivate::removeAllImages(
     QList< ImageRecord > & images,
     ImageFilesStorage::ImageType type )
{
     QList< ImageRecord >::Iterator it = images.begin();
     QList< ImageRecord >::Iterator last = images.end();

     while( it != last )
     {
         if( (*it).m_type == type )
         {
             LOG( DebugLogLevel, "Before real deletion" )
             removeFromDatabase( it );
             LOG( DebugLogLevel, "After real deletion" )

//            it = images.erase( it ); // LOOK AT THIS LINE !!! If I 
uncomment it and comment next line - crash...
             ++it;

             LOG( DebugLogLevel, QString( "it == last : %1" ).arg( ( it 
== last ? "true" : "false" ) ) )
         }
         else
             ++it;
     }
}

What is wrong?
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to