1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 17:14:00 +02:00

* Make sure JSResolver always has at least the default resolver icon set.

This commit is contained in:
Christian Muehlhaeuser
2013-06-20 09:31:31 +02:00
parent 0cd593e79d
commit 98354d1693

View File

@@ -513,7 +513,7 @@ JSResolver::init()
bool compressed = m.value( "compressed", "false" ).toString() == "true";
QByteArray icoData = m.value( "icon" ).toByteArray();
if( compressed )
if ( compressed )
icoData = qUncompress( QByteArray::fromBase64( icoData ) );
else
icoData = QByteArray::fromBase64( icoData );
@@ -533,6 +533,11 @@ JSResolver::init()
QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString();
success = m_icon.load( iconPath );
}
// if we still couldn't load the cover, set the default resolver icon
if ( m_icon.isNull() )
{
m_icon = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultResolver, TomahawkUtils::Original, QSize( 128, 128 ) );
}
// load config widget and apply settings
loadUi();