mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-03 20:57:52 +02:00
Support the legacy api that sends the path to the resolver icon file
This commit is contained in:
@@ -342,6 +342,13 @@ QtScriptResolver::init()
|
|||||||
m_icon = ico.scaled( m_icon.size(), Qt::IgnoreAspectRatio );
|
m_icon = ico.scaled( m_icon.size(), Qt::IgnoreAspectRatio );
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
|
// see if the resolver sent an icon path to not break the old (unofficial) api.
|
||||||
|
// TODO: remove this and publish a definitive api
|
||||||
|
if ( !success )
|
||||||
|
{
|
||||||
|
QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString();
|
||||||
|
success = m_icon.load( iconPath );
|
||||||
|
}
|
||||||
|
|
||||||
// load config widget and apply settings
|
// load config widget and apply settings
|
||||||
loadUi();
|
loadUi();
|
||||||
|
@@ -392,6 +392,13 @@ ScriptResolver::doSetup( const QVariantMap& m )
|
|||||||
m_icon = ico.scaled( m_icon.size(), Qt::IgnoreAspectRatio );
|
m_icon = ico.scaled( m_icon.size(), Qt::IgnoreAspectRatio );
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
|
// see if the resolver sent an icon path to not break the old (unofficial) api.
|
||||||
|
// TODO: remove this and publish a definitive api
|
||||||
|
if ( !success )
|
||||||
|
{
|
||||||
|
QString iconPath = QFileInfo( filePath() ).path() + "/" + m.value( "icon" ).toString();
|
||||||
|
success = m_icon.load( iconPath );
|
||||||
|
}
|
||||||
|
|
||||||
qDebug() << "SCRIPT" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon received" << success;
|
qDebug() << "SCRIPT" << filePath() << "READY," << "name" << m_name << "weight" << m_weight << "timeout" << m_timeout << "icon received" << success;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user