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

Fix code style

This commit is contained in:
Dominik Schmidt
2014-11-13 18:01:26 +01:00
parent b77d4dc73e
commit 0d51bfb786
3 changed files with 21 additions and 21 deletions

View File

@@ -55,7 +55,7 @@ JSInfoPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
d->requestDataCache[ requestData.requestId ] = 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( d->id ) // infoPluginId
.arg( requestData.requestId ) // requestId .arg( requestData.requestId ) // requestId
.arg( requestData.type ) // type .arg( requestData.type ) // type
@@ -100,7 +100,7 @@ JSInfoPlugin::notInCacheSlot( Tomahawk::InfoSystem::InfoStringHash criteria, Tom
void void
JSInfoPlugin::addInfoRequestResult ( int requestId, qint64 maxAge, const QVariantMap& returnedData ) JSInfoPlugin::addInfoRequestResult( int requestId, qint64 maxAge, const QVariantMap& returnedData )
{ {
Q_D( JSInfoPlugin ); Q_D( JSInfoPlugin );
@@ -119,7 +119,7 @@ JSInfoPlugin::addInfoRequestResult ( int requestId, qint64 maxAge, const QVarian
void void
JSInfoPlugin::emitGetCachedInfo ( int requestId, const QVariantMap& criteria, int newMaxAge ) JSInfoPlugin::emitGetCachedInfo( int requestId, const QVariantMap& criteria, int newMaxAge )
{ {
Q_D( JSInfoPlugin ); Q_D( JSInfoPlugin );
@@ -128,7 +128,7 @@ JSInfoPlugin::emitGetCachedInfo ( int requestId, const QVariantMap& criteria, in
void void
JSInfoPlugin::emitInfo ( int requestId, const QVariantMap& output ) JSInfoPlugin::emitInfo( int requestId, const QVariantMap& output )
{ {
Q_D( JSInfoPlugin ); Q_D( JSInfoPlugin );
@@ -141,12 +141,12 @@ JSInfoPlugin::serviceGetter() const
{ {
Q_D( const JSInfoPlugin ); Q_D( const JSInfoPlugin );
return QString("Tomahawk.InfoSystem.getInfoPlugin(%1)").arg( d->id ); return QString( "Tomahawk.InfoSystem.getInfoPlugin(%1)" ).arg( d->id );
} }
QVariant QVariant
JSInfoPlugin::callMethodOnInfoPlugin ( const QString& scriptSource ) JSInfoPlugin::callMethodOnInfoPlugin( const QString& scriptSource )
{ {
Q_D( JSInfoPlugin ); Q_D( JSInfoPlugin );
@@ -157,8 +157,9 @@ JSInfoPlugin::callMethodOnInfoPlugin ( const QString& scriptSource )
return d->resolver->evaluateJavaScript( eval ); return d->resolver->evaluateJavaScript( eval );
} }
QSet< Tomahawk::InfoSystem::InfoType > QSet< Tomahawk::InfoSystem::InfoType >
JSInfoPlugin::parseSupportedTypes ( const QVariant& variant ) JSInfoPlugin::parseSupportedTypes( const QVariant& variant )
{ {
QVariantList list = variant.toList(); QVariantList list = variant.toList();
@@ -179,7 +180,7 @@ JSInfoPlugin::parseSupportedTypes ( const QVariant& variant )
QString QString
JSInfoPlugin::serializeQVariantMap ( const QVariantMap& map ) JSInfoPlugin::serializeQVariantMap( const QVariantMap& map )
{ {
QVariantMap localMap = map; QVariantMap localMap = map;
@@ -203,12 +204,12 @@ JSInfoPlugin::serializeQVariantMap ( const QVariantMap& map )
QByteArray serialized = TomahawkUtils::toJson( localMap ); QByteArray serialized = TomahawkUtils::toJson( localMap );
return QString("JSON.parse('%1')").arg( QString::fromUtf8( serialized ) ); return QString( "JSON.parse('%1')" ).arg( QString::fromUtf8( serialized ) );
} }
QVariantMap QVariantMap
JSInfoPlugin::convertInfoStringHashToQVariantMap ( const Tomahawk::InfoSystem::InfoStringHash& hash ) JSInfoPlugin::convertInfoStringHashToQVariantMap( const Tomahawk::InfoSystem::InfoStringHash& hash )
{ {
QVariantMap map; QVariantMap map;
@@ -222,7 +223,7 @@ JSInfoPlugin::convertInfoStringHashToQVariantMap ( const Tomahawk::InfoSystem::I
Tomahawk::InfoSystem::InfoStringHash Tomahawk::InfoSystem::InfoStringHash
JSInfoPlugin::convertQVariantMapToInfoStringHash ( const QVariantMap& map ) JSInfoPlugin::convertQVariantMapToInfoStringHash( const QVariantMap& map )
{ {
Tomahawk::InfoSystem::InfoStringHash hash; Tomahawk::InfoSystem::InfoStringHash hash;

View File

@@ -44,7 +44,7 @@ QStringList JSInfoSystemHelper::requiredScriptPaths() const
void void
JSInfoSystemHelper::nativeAddInfoPlugin ( int id ) JSInfoSystemHelper::nativeAddInfoPlugin( int id )
{ {
Q_D( JSInfoSystemHelper ); Q_D( JSInfoSystemHelper );
@@ -64,7 +64,7 @@ JSInfoSystemHelper::nativeAddInfoPlugin ( int id )
void void
JSInfoSystemHelper::nativeRemoveInfoPlugin ( int id ) JSInfoSystemHelper::nativeRemoveInfoPlugin( int id )
{ {
Q_UNUSED( id ); Q_UNUSED( id );
tLog() << "Removing Info plugins from JS is not implemented yet"; tLog() << "Removing Info plugins from JS is not implemented yet";
@@ -73,7 +73,7 @@ JSInfoSystemHelper::nativeRemoveInfoPlugin ( int id )
void 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 ); Q_D( JSInfoSystemHelper );
@@ -88,7 +88,7 @@ JSInfoSystemHelper::nativeAddInfoRequestResult ( int infoPluginId, int requestId
void 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 ); Q_D( JSInfoSystemHelper );
@@ -99,10 +99,10 @@ JSInfoSystemHelper::nativeGetCachedInfo ( int infoPluginId, int requestId, int n
} }
d->infoPlugins[ infoPluginId ]->emitGetCachedInfo( requestId, criteria, newMaxAge ); d->infoPlugins[ infoPluginId ]->emitGetCachedInfo( requestId, criteria, newMaxAge );
} }
void JSInfoSystemHelper::nativeDataError ( int infoPluginId, int requestId )
void JSInfoSystemHelper::nativeDataError( int infoPluginId, int requestId )
{ {
Q_D( JSInfoSystemHelper ); Q_D( JSInfoSystemHelper );
@@ -114,4 +114,3 @@ void JSInfoSystemHelper::nativeDataError ( int infoPluginId, int requestId )
d->infoPlugins[ infoPluginId ]->emitInfo( requestId, QVariantMap() ); d->infoPlugins[ infoPluginId ]->emitInfo( requestId, QVariantMap() );
} }

View File

@@ -948,7 +948,7 @@ JSResolver::resolverCollections()
void void
JSResolver::loadScript ( const QString& path ) JSResolver::loadScript( const QString& path )
{ {
Q_D( JSResolver ); Q_D( JSResolver );
@@ -971,7 +971,7 @@ JSResolver::loadScript ( const QString& path )
void void
JSResolver::loadScripts ( const QStringList& paths ) JSResolver::loadScripts( const QStringList& paths )
{ {
foreach ( const QString& path, paths ) foreach ( const QString& path, paths )
{ {
@@ -981,7 +981,7 @@ JSResolver::loadScripts ( const QStringList& paths )
QVariant QVariant
JSResolver::callOnResolver ( const QString& scriptSource ) JSResolver::callOnResolver( const QString& scriptSource )
{ {
Q_D( JSResolver ); Q_D( JSResolver );