mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
* Fixed crash bug caused by multiple sources going on- and offline at a time.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
Version 0.0.4:
|
||||
* Fixed a crash situation caused by sources going on- or offline.
|
||||
|
||||
Version 0.0.3:
|
||||
* Show spinner while resolving playlists.
|
||||
* Go back to previous page visible when deleting a playlist.
|
||||
|
@@ -89,10 +89,13 @@ Query::refreshResults()
|
||||
void
|
||||
Query::onResultStatusChanged()
|
||||
{
|
||||
if ( m_results.count() )
|
||||
qStableSort( m_results.begin(), m_results.end(), Query::resultSorter );
|
||||
checkResults();
|
||||
{
|
||||
QMutexLocker lock( &m_mutex );
|
||||
if ( m_results.count() )
|
||||
qStableSort( m_results.begin(), m_results.end(), Query::resultSorter );
|
||||
}
|
||||
|
||||
checkResults();
|
||||
emit resultsChanged();
|
||||
}
|
||||
|
||||
@@ -180,27 +183,31 @@ Query::checkResults()
|
||||
{
|
||||
bool becameSolved = false;
|
||||
bool becameUnsolved = true;
|
||||
m_playable = false;
|
||||
|
||||
// hook up signals, and check solved status
|
||||
foreach( const result_ptr& rp, m_results )
|
||||
{
|
||||
if ( rp->score() > 0.0 && rp->collection().isNull() )
|
||||
{
|
||||
m_playable = true;
|
||||
}
|
||||
if ( !rp->collection().isNull() && rp->collection()->source()->isOnline() )
|
||||
{
|
||||
m_playable = true;
|
||||
QMutexLocker lock( &m_mutex );
|
||||
|
||||
if ( rp->score() > 0.99 )
|
||||
m_playable = false;
|
||||
|
||||
// hook up signals, and check solved status
|
||||
foreach( const result_ptr& rp, m_results )
|
||||
{
|
||||
if ( rp->score() > 0.0 && rp->collection().isNull() )
|
||||
{
|
||||
becameUnsolved = false;
|
||||
m_playable = true;
|
||||
}
|
||||
if ( !rp->collection().isNull() && rp->collection()->source()->isOnline() )
|
||||
{
|
||||
m_playable = true;
|
||||
|
||||
if ( !m_solved )
|
||||
if ( rp->score() > 0.99 )
|
||||
{
|
||||
m_solved = true;
|
||||
becameSolved = true;
|
||||
becameUnsolved = false;
|
||||
|
||||
if ( !m_solved )
|
||||
{
|
||||
m_solved = true;
|
||||
becameSolved = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user