diff --git a/src/libtomahawk/album.cpp b/src/libtomahawk/album.cpp index a2032a858..f6baa3baa 100644 --- a/src/libtomahawk/album.cpp +++ b/src/libtomahawk/album.cpp @@ -13,7 +13,9 @@ album_ptr Album::get( unsigned int id, const QString& name, const Tomahawk::artist_ptr& artist, const Tomahawk::collection_ptr& collection ) { static QHash< unsigned int, album_ptr > s_albums; + static QMutex s_mutex; + QMutexLocker lock( &s_mutex ); if ( s_albums.contains( id ) ) { return s_albums.value( id ); diff --git a/src/libtomahawk/artist.cpp b/src/libtomahawk/artist.cpp index 596cede96..fe0c9fd21 100644 --- a/src/libtomahawk/artist.cpp +++ b/src/libtomahawk/artist.cpp @@ -16,7 +16,9 @@ artist_ptr Artist::get( unsigned int id, const QString& name, const Tomahawk::collection_ptr& collection ) { static QHash< unsigned int, artist_ptr > s_artists; + static QMutex s_mutex; + QMutexLocker lock( &s_mutex ); if ( s_artists.contains( id ) ) { return s_artists.value( id ); diff --git a/src/libtomahawk/utils/querylabel.cpp b/src/libtomahawk/utils/querylabel.cpp index 4e566ccd9..5a211f350 100644 --- a/src/libtomahawk/utils/querylabel.cpp +++ b/src/libtomahawk/utils/querylabel.cpp @@ -493,21 +493,21 @@ QueryLabel::mouseMoveEvent( QMouseEvent* event ) { m_hoverType = Artist; hoverArea.setLeft( 0 ); - hoverArea.setRight( artistX + contentsMargins().left() ); + hoverArea.setRight( artistX + contentsMargins().left() - 1 ); } else if ( m_type & Album && x < albumX && x > artistX ) { m_hoverType = Album; int spacing = ( m_type & Artist ) ? dashX : 0; hoverArea.setLeft( artistX + spacing ); - hoverArea.setRight( albumX + spacing + contentsMargins().left() ); + hoverArea.setRight( albumX + spacing + contentsMargins().left() - 1 ); } else if ( m_type & Track && x < trackX && x > albumX ) { m_hoverType = Track; int spacing = ( m_type & Album ) ? dashX : 0; hoverArea.setLeft( albumX + spacing ); - hoverArea.setRight( trackX + contentsMargins().left() ); + hoverArea.setRight( trackX + contentsMargins().left() - 1 ); } if ( hoverArea.width() )