mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
* Potential fix for assert.
This commit is contained in:
@@ -131,7 +131,7 @@ SourceList::sources( bool onlyOnline ) const
|
|||||||
|
|
||||||
|
|
||||||
source_ptr
|
source_ptr
|
||||||
SourceList::get( unsigned int id ) const
|
SourceList::get( int id ) const
|
||||||
{
|
{
|
||||||
QMutexLocker lock( &m_mut );
|
QMutexLocker lock( &m_mut );
|
||||||
return m_sources.value( m_sources_id2name.value( id ) );
|
return m_sources.value( m_sources_id2name.value( id ) );
|
||||||
|
@@ -28,7 +28,7 @@ public:
|
|||||||
unsigned int count() const;
|
unsigned int count() const;
|
||||||
|
|
||||||
Tomahawk::source_ptr get( const QString& username, const QString& friendlyName = QString() );
|
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:
|
signals:
|
||||||
void ready();
|
void ready();
|
||||||
@@ -45,7 +45,7 @@ private:
|
|||||||
void add( const Tomahawk::source_ptr& source );
|
void add( const Tomahawk::source_ptr& source );
|
||||||
|
|
||||||
QMap< QString, Tomahawk::source_ptr > m_sources;
|
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;
|
Tomahawk::source_ptr m_local;
|
||||||
mutable QMutex m_mut; // mutable so const methods can use a lock
|
mutable QMutex m_mut; // mutable so const methods can use a lock
|
||||||
|
Reference in New Issue
Block a user