From 511c1aef7037cbeb283100c9145f4501877e96f6 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 27 Apr 2013 01:20:36 +0200 Subject: [PATCH] * Style fixes. --- .../accounts/spotify/SpotifyAccount.cpp | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/libtomahawk/accounts/spotify/SpotifyAccount.cpp b/src/libtomahawk/accounts/spotify/SpotifyAccount.cpp index 04c423c0b..d8a976a30 100644 --- a/src/libtomahawk/accounts/spotify/SpotifyAccount.cpp +++ b/src/libtomahawk/accounts/spotify/SpotifyAccount.cpp @@ -67,11 +67,11 @@ static QString s_resolverId = "spotify-unknown"; namespace { -enum ActionType { - Sync = 0, - Subscribe = 1, - Collaborate -}; + enum ActionType { + Sync = 0, + Subscribe = 1, + Collaborate + }; } Account* @@ -99,6 +99,7 @@ SpotifyAccount::instance() return s_instance; } + SpotifyAccount::SpotifyAccount( const QString& accountId ) : CustomAtticaAccount( accountId ) , m_preventEnabling( false ) @@ -185,6 +186,7 @@ SpotifyAccount::delayedInit() } } + void SpotifyAccount::hookupResolver() { @@ -260,6 +262,7 @@ SpotifyAccount::checkForResolver() return false; } + void SpotifyAccount::resolverChanged() { @@ -416,6 +419,7 @@ SpotifyAccount::setManualResolverPath( const QString &resolverPath ) } } + void SpotifyAccount::starTrack(const QString &artist, const QString &title, const bool starred) { @@ -558,7 +562,6 @@ SpotifyAccount::aboutToShow( QAction* action, const playlist_ptr& playlist ) SpotifyPlaylistUpdater* SpotifyAccount::getPlaylistUpdater( const playlist_ptr plptr ) { - SpotifyPlaylistUpdater* updater = 0; QList updaters = plptr->updaters(); foreach ( PlaylistUpdaterInterface* u, updaters ) @@ -571,6 +574,7 @@ SpotifyAccount::getPlaylistUpdater( const playlist_ptr plptr ) return updater; } + SpotifyPlaylistUpdater* SpotifyAccount::getPlaylistUpdater( QObject *sender ) { @@ -610,6 +614,7 @@ SpotifyAccount::getPlaylistUpdater( QObject *sender ) return updater; } + void SpotifyAccount::subscribeActionTriggered( QAction* action ) { @@ -811,7 +816,6 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg return; } - const QString qid = msg.value( "qid" ).toString(); if ( m_qidToSlotMap.contains( qid ) ) { @@ -885,7 +889,7 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg const QString newRev = msg.value( "revid" ).toString(); const QString oldRev = msg.value( "oldRev" ).toString(); - updater->spotifyTracksAdded( tracksList, startPos, newRev, oldRev ); + updater->spotifyTracksAdded( tracksList, startPos, newRev, oldRev ); } else if ( msgType == "tracksRemoved" ) { @@ -1313,6 +1317,7 @@ SpotifyAccount::startPlaylistSyncWithPlaylist( const QString& msgType, const QVa } } + void SpotifyAccount::playlistCopyCreated( const QString& msgType, const QVariantMap& msg, const QVariant& ) { @@ -1396,12 +1401,14 @@ SpotifyAccount::sendMessage( const QVariantMap &m, QObject* obj, const QString& return qid; } + bool SpotifyAccount::hasPlaylist(const QString& plId) { return m_updaters.contains( plId ); } + Tomahawk::playlist_ptr SpotifyAccount::playlistForURI(const QString& plId) { @@ -1415,12 +1422,14 @@ SpotifyAccount::registerUpdaterForPlaylist( const QString& plId, SpotifyPlaylist m_updaters[ plId ] = updater; } + void SpotifyAccount::registerPlaylistInfo( const QString& name, const QString& plid, const QString &revid, const bool sync, const bool subscribed, const bool owner ) { m_allSpotifyPlaylists[ plid ] = new SpotifyPlaylistInfo( name, plid, revid, sync, subscribed, owner ); } + void SpotifyAccount::registerPlaylistInfo( SpotifyPlaylistInfo* info ) { @@ -1496,7 +1505,6 @@ SpotifyAccount::stopPlaylistSync( SpotifyPlaylistInfo* playlist, bool forceDontD } - void SpotifyAccount::loadPlaylists() {