1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 02:09:48 +01:00

* Fixed TWK-1096: Deleting a playlist destroys the current view.

This commit is contained in:
Christian Muehlhaeuser 2012-11-11 09:49:29 +01:00
parent d5798d0614
commit 3062e6d2bd
3 changed files with 12 additions and 4 deletions

View File

@ -144,6 +144,8 @@ FlexibleView::setDetailedView( TrackView* view )
delete m_detailedView;
}
connect( view, SIGNAL( destroyed( QWidget* ) ), SLOT( onWidgetDestroyed( QWidget* ) ), Qt::UniqueConnection );
view->setPlaylistInterface( m_playlistInterface );
m_detailedView = view;
@ -289,4 +291,12 @@ FlexibleView::setPixmap( const QPixmap& pixmap )
m_header->setPixmap( pixmap );
}
void
FlexibleView::onWidgetDestroyed( QWidget* widget )
{
emit destroyed( this );
}
#include "FlexibleView.moc"

View File

@ -72,8 +72,10 @@ public slots:
signals:
void modeChanged( FlexibleViewMode mode );
void destroyed( QWidget* widget );
private slots:
void onWidgetDestroyed( QWidget* widget );
private:
FlexibleHeader* m_header;

View File

@ -73,9 +73,6 @@ void
PlaylistView::keyPressEvent( QKeyEvent* event )
{
TrackView::keyPressEvent( event );
if ( !model() )
return;
}
@ -124,7 +121,6 @@ PlaylistView::updaters() const
void
PlaylistView::onDeleted()
{
qDebug() << Q_FUNC_INFO;
emit destroyed( widget() );
}