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:
parent
50bce627a8
commit
33a63a45e8
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user