[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: extragear/multimedia/amarok/src/contextview
From:       "Seb Ruiz" <ruiz () kde ! org>
Date:       2007-06-23 9:42:06
Message-ID: 60ebdd0b0706230242p523d9ce5k8c1e8f231da24897 () mail ! gmail ! com
[Download RAW message or body]

On 22/06/07, Leo Franchi <angel666@myrealbox.com> wrote:

> @@ -407,7 +424,13 @@
>      for( i = m_contextItems.begin(); i != m_contextItems.end(); ++i )
>      {
>          if( (*i) == item )
> +        { // also remove any boxes owned by the item
> +            QList< QGraphicsItem* >* items = m_contextItemMap.value( *i );
> +            foreach( QGraphicsItem* box, *items )
> +                removeContextBox( box );
>              m_contextItems.erase( i );
> +            m_contextItemMap.remove( *i );
> +        }
>      }
>  }

Maybe this should be done by the ContextItem? It could be done in the
dtor of the item, so that every "item" must manage the cleanup on it's
own?

Leo, what do you think?

Seb

-- 
http://www.sebruiz.net/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic