1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-03 10:15:45 +00:00

Qt 4.4 is still pretty new, so don't use QList.removeOne() yet. (build error reported by kklimonda)

This commit is contained in:
Charles Kerr 2009-09-02 15:34:18 +00:00
parent 515a3f986f
commit ae675f3d6f

View file

@ -43,9 +43,13 @@ FileTreeItem :: ~FileTreeItem( )
{
assert( myChildren.isEmpty( ) );
if( myParent )
if( !myParent->myChildren.removeOne( this ) )
if( myParent ) {
const int pos = myParent->myChildren.indexOf( this );
if( pos >= 0 )
myParent->myChildren.removeAt( pos );
else
assert( 0 && "failed to remove" );
}
}
void