mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
* Make sure JSResolver always has at least the default resolver icon set.
This commit is contained in:
@@ -513,7 +513,7 @@ JSResolver::init()
|
|||||||
bool compressed = m.value( "compressed", "false" ).toString() == "true";
|
bool compressed = m.value( "compressed", "false" ).toString() == "true";
|
||||||
|
|
||||||
QByteArray icoData = m.value( "icon" ).toByteArray();
|
QByteArray icoData = m.value( "icon" ).toByteArray();
|
||||||
if( compressed )
|
if ( compressed )
|
||||||
icoData = qUncompress( QByteArray::fromBase64( icoData ) );
|
icoData = qUncompress( QByteArray::fromBase64( icoData ) );
|
||||||
else
|
else
|
||||||
icoData = QByteArray::fromBase64( icoData );
|
icoData = QByteArray::fromBase64( icoData );
|
||||||
@@ -533,6 +533,11 @@ JSResolver::init()
|
|||||||
QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString();
|
QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString();
|
||||||
success = m_icon.load( iconPath );
|
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
|
// load config widget and apply settings
|
||||||
loadUi();
|
loadUi();
|
||||||
|
Reference in New Issue
Block a user