1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-20 07:52:30 +02:00

* Potential fix for assert.

This commit is contained in:
Christian Muehlhaeuser 2011-02-24 12:50:30 +01:00
parent 3d9a1f4a91
commit 763aad9539
2 changed files with 3 additions and 3 deletions

View File

@ -131,7 +131,7 @@ SourceList::sources( bool onlyOnline ) const
source_ptr
SourceList::get( unsigned int id ) const
SourceList::get( int id ) const
{
QMutexLocker lock( &m_mut );
return m_sources.value( m_sources_id2name.value( id ) );

View File

@ -28,7 +28,7 @@ public:
unsigned int count() const;
Tomahawk::source_ptr get( const QString& username, const QString& friendlyName = QString() );
Tomahawk::source_ptr get( unsigned int id ) const;
Tomahawk::source_ptr get( int id ) const;
signals:
void ready();
@ -45,7 +45,7 @@ private:
void add( const Tomahawk::source_ptr& source );
QMap< QString, Tomahawk::source_ptr > m_sources;
QMap< unsigned int, QString > m_sources_id2name;
QMap< int, QString > m_sources_id2name;
Tomahawk::source_ptr m_local;
mutable QMutex m_mut; // mutable so const methods can use a lock