From 763aad9539b2aa0dc291743df7b6d92ef1bcdce9 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 24 Feb 2011 12:50:30 +0100 Subject: [PATCH] * Potential fix for assert. --- src/libtomahawk/sourcelist.cpp | 2 +- src/libtomahawk/sourcelist.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/sourcelist.cpp b/src/libtomahawk/sourcelist.cpp index 531bad488..d900be28e 100644 --- a/src/libtomahawk/sourcelist.cpp +++ b/src/libtomahawk/sourcelist.cpp @@ -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 ) ); diff --git a/src/libtomahawk/sourcelist.h b/src/libtomahawk/sourcelist.h index aeabad234..8b1861476 100644 --- a/src/libtomahawk/sourcelist.h +++ b/src/libtomahawk/sourcelist.h @@ -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