mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
Fixed dupe signal connection in TemporaryPageItem.
This commit is contained in:
@@ -274,7 +274,6 @@ SourceTreeItem::removeFromList()
|
|||||||
void
|
void
|
||||||
SourceTreeItem::pageDestroyed()
|
SourceTreeItem::pageDestroyed()
|
||||||
{
|
{
|
||||||
//FIXME: this seems to be triggered twice for temporary pages
|
|
||||||
model()->removeSourceItemLink( this );
|
model()->removeSourceItemLink( this );
|
||||||
|
|
||||||
int idx = parent()->children().indexOf( this );
|
int idx = parent()->children().indexOf( this );
|
||||||
|
@@ -81,12 +81,6 @@ TemporaryPageItem::TemporaryPageItem( SourcesModel* mdl, SourceTreeItem* parent,
|
|||||||
NewClosure( action, SIGNAL( triggered() ), this, SLOT( linkActionTriggered( QAction* ) ), action );
|
NewClosure( action, SIGNAL( triggered() ), this, SLOT( linkActionTriggered( QAction* ) ), action );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( QObject* obj = dynamic_cast< QObject* >( page ) )
|
|
||||||
{
|
|
||||||
if ( obj->metaObject()->indexOfSignal( "destroyed(QObject*)" ) > -1 )
|
|
||||||
connect( obj, SIGNAL( destroyed( QObject* ) ), SLOT( pageDestroyed() ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
model()->linkSourceItemToPage( this, page );
|
model()->linkSourceItemToPage( this, page );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user