|
|
@ -921,12 +921,15 @@ Playlist::updateEntriesStatusAdded( const TQMap<TQString,TQString> &map )
|
|
|
|
TQMap<TQString,TQPtrList<PlaylistItem>*> uniquecopy( m_uniqueMap );
|
|
|
|
TQMap<TQString,TQPtrList<PlaylistItem>*> uniquecopy( m_uniqueMap );
|
|
|
|
|
|
|
|
|
|
|
|
TQMap<TQString,TQPtrList<PlaylistItem>*>::Iterator it;
|
|
|
|
TQMap<TQString,TQPtrList<PlaylistItem>*>::Iterator it;
|
|
|
|
for( it = uniquecopy.begin(); it != uniquecopy.end(); ++it )
|
|
|
|
for( it = uniquecopy.begin(); it != uniquecopy.end(); )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if( map.contains( it.key() ))
|
|
|
|
// remove() may invalidate the iterator, so make a copy and increment
|
|
|
|
|
|
|
|
// it before modifying the collection
|
|
|
|
|
|
|
|
TQMap<TQString,TQPtrList<PlaylistItem>*>::Iterator cur = it++;
|
|
|
|
|
|
|
|
if( map.contains( cur.key() ))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
updateEntriesStatusAdded( map[it.key()], it.key() );
|
|
|
|
updateEntriesStatusAdded( map[cur.key()], cur.key() );
|
|
|
|
uniquecopy.remove( it );
|
|
|
|
uniquecopy.remove( cur );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|