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:
parent
3d9a1f4a91
commit
763aad9539
@ -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 ) );
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user