1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

Fix Result::toString to work with m_track == nullptr

This commit is contained in:
Uwe L. Korn
2014-09-28 14:17:41 +01:00
parent 8562bcfe2b
commit 435770c557

View File

@@ -232,6 +232,8 @@ Result::toVariant() const
QString
Result::toString() const
{
if ( m_track )
{
return QString( "Result(%1, score: %2) %3 - %4%5 (%6)" )
.arg( id() )
@@ -240,6 +242,12 @@ Result::toString() const
.arg( m_track->track() )
.arg( m_track->album().isEmpty() ? QString() : QString( " on %1" ).arg( m_track->album() ) )
.arg( m_url );
} else {
return QString( "Result(%1, score: %2) (%3)" )
.arg( id() )
.arg( m_score )
.arg( m_url );
}
}