mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Fix code style
This commit is contained in:
parent
b77d4dc73e
commit
0d51bfb786
@ -55,7 +55,7 @@ JSInfoPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
|
||||
d->requestDataCache[ requestData.requestId ] = requestData;
|
||||
|
||||
QString eval = QString("_getInfo(%1, %2, %3, %4)")
|
||||
QString eval = QString( "_getInfo(%1, %2, %3, %4)" )
|
||||
.arg( d->id ) // infoPluginId
|
||||
.arg( requestData.requestId ) // requestId
|
||||
.arg( requestData.type ) // type
|
||||
@ -100,7 +100,7 @@ JSInfoPlugin::notInCacheSlot( Tomahawk::InfoSystem::InfoStringHash criteria, Tom
|
||||
|
||||
|
||||
void
|
||||
JSInfoPlugin::addInfoRequestResult ( int requestId, qint64 maxAge, const QVariantMap& returnedData )
|
||||
JSInfoPlugin::addInfoRequestResult( int requestId, qint64 maxAge, const QVariantMap& returnedData )
|
||||
{
|
||||
Q_D( JSInfoPlugin );
|
||||
|
||||
@ -119,7 +119,7 @@ JSInfoPlugin::addInfoRequestResult ( int requestId, qint64 maxAge, const QVarian
|
||||
|
||||
|
||||
void
|
||||
JSInfoPlugin::emitGetCachedInfo ( int requestId, const QVariantMap& criteria, int newMaxAge )
|
||||
JSInfoPlugin::emitGetCachedInfo( int requestId, const QVariantMap& criteria, int newMaxAge )
|
||||
{
|
||||
Q_D( JSInfoPlugin );
|
||||
|
||||
@ -128,7 +128,7 @@ JSInfoPlugin::emitGetCachedInfo ( int requestId, const QVariantMap& criteria, in
|
||||
|
||||
|
||||
void
|
||||
JSInfoPlugin::emitInfo ( int requestId, const QVariantMap& output )
|
||||
JSInfoPlugin::emitInfo( int requestId, const QVariantMap& output )
|
||||
{
|
||||
Q_D( JSInfoPlugin );
|
||||
|
||||
@ -141,12 +141,12 @@ JSInfoPlugin::serviceGetter() const
|
||||
{
|
||||
Q_D( const JSInfoPlugin );
|
||||
|
||||
return QString("Tomahawk.InfoSystem.getInfoPlugin(%1)").arg( d->id );
|
||||
return QString( "Tomahawk.InfoSystem.getInfoPlugin(%1)" ).arg( d->id );
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
JSInfoPlugin::callMethodOnInfoPlugin ( const QString& scriptSource )
|
||||
JSInfoPlugin::callMethodOnInfoPlugin( const QString& scriptSource )
|
||||
{
|
||||
Q_D( JSInfoPlugin );
|
||||
|
||||
@ -157,8 +157,9 @@ JSInfoPlugin::callMethodOnInfoPlugin ( const QString& scriptSource )
|
||||
return d->resolver->evaluateJavaScript( eval );
|
||||
}
|
||||
|
||||
|
||||
QSet< Tomahawk::InfoSystem::InfoType >
|
||||
JSInfoPlugin::parseSupportedTypes ( const QVariant& variant )
|
||||
JSInfoPlugin::parseSupportedTypes( const QVariant& variant )
|
||||
{
|
||||
QVariantList list = variant.toList();
|
||||
|
||||
@ -179,7 +180,7 @@ JSInfoPlugin::parseSupportedTypes ( const QVariant& variant )
|
||||
|
||||
|
||||
QString
|
||||
JSInfoPlugin::serializeQVariantMap ( const QVariantMap& map )
|
||||
JSInfoPlugin::serializeQVariantMap( const QVariantMap& map )
|
||||
{
|
||||
QVariantMap localMap = map;
|
||||
|
||||
@ -203,12 +204,12 @@ JSInfoPlugin::serializeQVariantMap ( const QVariantMap& map )
|
||||
|
||||
QByteArray serialized = TomahawkUtils::toJson( localMap );
|
||||
|
||||
return QString("JSON.parse('%1')").arg( QString::fromUtf8( serialized ) );
|
||||
return QString( "JSON.parse('%1')" ).arg( QString::fromUtf8( serialized ) );
|
||||
}
|
||||
|
||||
|
||||
QVariantMap
|
||||
JSInfoPlugin::convertInfoStringHashToQVariantMap ( const Tomahawk::InfoSystem::InfoStringHash& hash )
|
||||
JSInfoPlugin::convertInfoStringHashToQVariantMap( const Tomahawk::InfoSystem::InfoStringHash& hash )
|
||||
{
|
||||
QVariantMap map;
|
||||
|
||||
@ -222,7 +223,7 @@ JSInfoPlugin::convertInfoStringHashToQVariantMap ( const Tomahawk::InfoSystem::I
|
||||
|
||||
|
||||
Tomahawk::InfoSystem::InfoStringHash
|
||||
JSInfoPlugin::convertQVariantMapToInfoStringHash ( const QVariantMap& map )
|
||||
JSInfoPlugin::convertQVariantMapToInfoStringHash( const QVariantMap& map )
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoStringHash hash;
|
||||
|
||||
|
@ -44,7 +44,7 @@ QStringList JSInfoSystemHelper::requiredScriptPaths() const
|
||||
|
||||
|
||||
void
|
||||
JSInfoSystemHelper::nativeAddInfoPlugin ( int id )
|
||||
JSInfoSystemHelper::nativeAddInfoPlugin( int id )
|
||||
{
|
||||
Q_D( JSInfoSystemHelper );
|
||||
|
||||
@ -64,7 +64,7 @@ JSInfoSystemHelper::nativeAddInfoPlugin ( int id )
|
||||
|
||||
|
||||
void
|
||||
JSInfoSystemHelper::nativeRemoveInfoPlugin ( int id )
|
||||
JSInfoSystemHelper::nativeRemoveInfoPlugin( int id )
|
||||
{
|
||||
Q_UNUSED( id );
|
||||
tLog() << "Removing Info plugins from JS is not implemented yet";
|
||||
@ -73,7 +73,7 @@ JSInfoSystemHelper::nativeRemoveInfoPlugin ( int id )
|
||||
|
||||
|
||||
void
|
||||
JSInfoSystemHelper::nativeAddInfoRequestResult ( int infoPluginId, int requestId, int maxAge, const QVariantMap& returnedData )
|
||||
JSInfoSystemHelper::nativeAddInfoRequestResult( int infoPluginId, int requestId, int maxAge, const QVariantMap& returnedData )
|
||||
{
|
||||
Q_D( JSInfoSystemHelper );
|
||||
|
||||
@ -88,7 +88,7 @@ JSInfoSystemHelper::nativeAddInfoRequestResult ( int infoPluginId, int requestId
|
||||
|
||||
|
||||
void
|
||||
JSInfoSystemHelper::nativeGetCachedInfo ( int infoPluginId, int requestId, int newMaxAge, const QVariantMap& criteria )
|
||||
JSInfoSystemHelper::nativeGetCachedInfo( int infoPluginId, int requestId, int newMaxAge, const QVariantMap& criteria )
|
||||
{
|
||||
Q_D( JSInfoSystemHelper );
|
||||
|
||||
@ -99,10 +99,10 @@ JSInfoSystemHelper::nativeGetCachedInfo ( int infoPluginId, int requestId, int n
|
||||
}
|
||||
|
||||
d->infoPlugins[ infoPluginId ]->emitGetCachedInfo( requestId, criteria, newMaxAge );
|
||||
|
||||
}
|
||||
|
||||
void JSInfoSystemHelper::nativeDataError ( int infoPluginId, int requestId )
|
||||
|
||||
void JSInfoSystemHelper::nativeDataError( int infoPluginId, int requestId )
|
||||
{
|
||||
Q_D( JSInfoSystemHelper );
|
||||
|
||||
@ -114,4 +114,3 @@ void JSInfoSystemHelper::nativeDataError ( int infoPluginId, int requestId )
|
||||
|
||||
d->infoPlugins[ infoPluginId ]->emitInfo( requestId, QVariantMap() );
|
||||
}
|
||||
|
||||
|
@ -948,7 +948,7 @@ JSResolver::resolverCollections()
|
||||
|
||||
|
||||
void
|
||||
JSResolver::loadScript ( const QString& path )
|
||||
JSResolver::loadScript( const QString& path )
|
||||
{
|
||||
Q_D( JSResolver );
|
||||
|
||||
@ -971,7 +971,7 @@ JSResolver::loadScript ( const QString& path )
|
||||
|
||||
|
||||
void
|
||||
JSResolver::loadScripts ( const QStringList& paths )
|
||||
JSResolver::loadScripts( const QStringList& paths )
|
||||
{
|
||||
foreach ( const QString& path, paths )
|
||||
{
|
||||
@ -981,7 +981,7 @@ JSResolver::loadScripts ( const QStringList& paths )
|
||||
|
||||
|
||||
QVariant
|
||||
JSResolver::callOnResolver ( const QString& scriptSource )
|
||||
JSResolver::callOnResolver( const QString& scriptSource )
|
||||
{
|
||||
Q_D( JSResolver );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user