mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-14 04:51:53 +02:00
resize resolver icons before storing them
This commit is contained in:
parent
68e3bcb54b
commit
4ec6c1fd82
src/libtomahawk/resolvers
@ -333,14 +333,22 @@ QtScriptResolver::init()
|
||||
icoData = qUncompress( QByteArray::fromBase64( icoData ) );
|
||||
else
|
||||
icoData = QByteArray::fromBase64( icoData );
|
||||
bool success = m_icon.loadFromData( icoData );
|
||||
QPixmap ico;
|
||||
ico.loadFromData( icoData );
|
||||
|
||||
bool success = false;
|
||||
if ( !ico.isNull() )
|
||||
{
|
||||
m_icon = ico.scaled( m_icon.size(), Qt::IgnoreAspectRatio );
|
||||
success = true;
|
||||
}
|
||||
|
||||
// load config widget and apply settings
|
||||
loadUi();
|
||||
QVariantMap config = resolverUserConfig();
|
||||
fillDataInWidgets( config );
|
||||
|
||||
qDebug() << "JS" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon found" << success;
|
||||
qDebug() << "JS" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon received" << success;
|
||||
|
||||
m_ready = true;
|
||||
}
|
||||
|
@ -383,9 +383,17 @@ ScriptResolver::doSetup( const QVariantMap& m )
|
||||
icoData = qUncompress( QByteArray::fromBase64( icoData ) );
|
||||
else
|
||||
icoData = QByteArray::fromBase64( icoData );
|
||||
bool success = m_icon.loadFromData( icoData );
|
||||
QPixmap ico;
|
||||
ico.loadFromData( icoData );
|
||||
|
||||
qDebug() << "SCRIPT" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon found" << success;
|
||||
bool success = false;
|
||||
if ( !ico.isNull() )
|
||||
{
|
||||
m_icon = ico.scaled( m_icon.size(), Qt::IgnoreAspectRatio );
|
||||
success = true;
|
||||
}
|
||||
|
||||
qDebug() << "SCRIPT" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon received" << success;
|
||||
|
||||
m_ready = true;
|
||||
m_configSent = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user