1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-13 20:41:58 +02:00

* Fixed mutex deadlock in SourceList.

This commit is contained in:
Christian Muehlhaeuser 2011-08-27 21:46:13 +02:00
parent 50bce627a8
commit 33a63a45e8
2 changed files with 10 additions and 12 deletions

View File

@ -83,15 +83,17 @@ SourceList::loadSources()
void
SourceList::setSources( const QList<Tomahawk::source_ptr>& sources )
{
QMutexLocker lock( &m_mut );
m_isReady = true;
foreach( const source_ptr& src, sources )
{
add( src );
}
QMutexLocker lock( &m_mut );
tLog() << Q_FUNC_INFO << "- Total sources now:" << m_sources.size();
m_isReady = true;
foreach( const source_ptr& src, sources )
{
add( src );
}
tLog() << Q_FUNC_INFO << "- Total sources now:" << m_sources.size();
}
emit ready();
}

View File

@ -36,11 +36,7 @@ RecentPlaylistsModel::RecentPlaylistsModel( unsigned int maxPlaylists, QObject*
: QAbstractListModel( parent )
, m_maxPlaylists( maxPlaylists )
{
if ( Servent::instance()->isReady() )
onReady();
else
connect( Servent::instance(), SIGNAL( ready() ), this, SLOT( onReady() ) );
connect( SourceList::instance(), SIGNAL( ready() ), SLOT( onReady() ) );
// Load recent playlists initially
refresh();