mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Style fixes.
This commit is contained in:
@@ -67,11 +67,11 @@ static QString s_resolverId = "spotify-unknown";
|
|||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
enum ActionType {
|
enum ActionType {
|
||||||
Sync = 0,
|
Sync = 0,
|
||||||
Subscribe = 1,
|
Subscribe = 1,
|
||||||
Collaborate
|
Collaborate
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Account*
|
Account*
|
||||||
@@ -99,6 +99,7 @@ SpotifyAccount::instance()
|
|||||||
return s_instance;
|
return s_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SpotifyAccount::SpotifyAccount( const QString& accountId )
|
SpotifyAccount::SpotifyAccount( const QString& accountId )
|
||||||
: CustomAtticaAccount( accountId )
|
: CustomAtticaAccount( accountId )
|
||||||
, m_preventEnabling( false )
|
, m_preventEnabling( false )
|
||||||
@@ -185,6 +186,7 @@ SpotifyAccount::delayedInit()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::hookupResolver()
|
SpotifyAccount::hookupResolver()
|
||||||
{
|
{
|
||||||
@@ -260,6 +262,7 @@ SpotifyAccount::checkForResolver()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::resolverChanged()
|
SpotifyAccount::resolverChanged()
|
||||||
{
|
{
|
||||||
@@ -416,6 +419,7 @@ SpotifyAccount::setManualResolverPath( const QString &resolverPath )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::starTrack(const QString &artist, const QString &title, const bool starred)
|
SpotifyAccount::starTrack(const QString &artist, const QString &title, const bool starred)
|
||||||
{
|
{
|
||||||
@@ -558,7 +562,6 @@ SpotifyAccount::aboutToShow( QAction* action, const playlist_ptr& playlist )
|
|||||||
SpotifyPlaylistUpdater*
|
SpotifyPlaylistUpdater*
|
||||||
SpotifyAccount::getPlaylistUpdater( const playlist_ptr plptr )
|
SpotifyAccount::getPlaylistUpdater( const playlist_ptr plptr )
|
||||||
{
|
{
|
||||||
|
|
||||||
SpotifyPlaylistUpdater* updater = 0;
|
SpotifyPlaylistUpdater* updater = 0;
|
||||||
QList<PlaylistUpdaterInterface*> updaters = plptr->updaters();
|
QList<PlaylistUpdaterInterface*> updaters = plptr->updaters();
|
||||||
foreach ( PlaylistUpdaterInterface* u, updaters )
|
foreach ( PlaylistUpdaterInterface* u, updaters )
|
||||||
@@ -571,6 +574,7 @@ SpotifyAccount::getPlaylistUpdater( const playlist_ptr plptr )
|
|||||||
return updater;
|
return updater;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SpotifyPlaylistUpdater*
|
SpotifyPlaylistUpdater*
|
||||||
SpotifyAccount::getPlaylistUpdater( QObject *sender )
|
SpotifyAccount::getPlaylistUpdater( QObject *sender )
|
||||||
{
|
{
|
||||||
@@ -610,6 +614,7 @@ SpotifyAccount::getPlaylistUpdater( QObject *sender )
|
|||||||
return updater;
|
return updater;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::subscribeActionTriggered( QAction* action )
|
SpotifyAccount::subscribeActionTriggered( QAction* action )
|
||||||
{
|
{
|
||||||
@@ -811,7 +816,6 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QString qid = msg.value( "qid" ).toString();
|
const QString qid = msg.value( "qid" ).toString();
|
||||||
if ( m_qidToSlotMap.contains( qid ) )
|
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 newRev = msg.value( "revid" ).toString();
|
||||||
const QString oldRev = msg.value( "oldRev" ).toString();
|
const QString oldRev = msg.value( "oldRev" ).toString();
|
||||||
|
|
||||||
updater->spotifyTracksAdded( tracksList, startPos, newRev, oldRev );
|
updater->spotifyTracksAdded( tracksList, startPos, newRev, oldRev );
|
||||||
}
|
}
|
||||||
else if ( msgType == "tracksRemoved" )
|
else if ( msgType == "tracksRemoved" )
|
||||||
{
|
{
|
||||||
@@ -1313,6 +1317,7 @@ SpotifyAccount::startPlaylistSyncWithPlaylist( const QString& msgType, const QVa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::playlistCopyCreated( const QString& msgType, const QVariantMap& msg, const QVariant& )
|
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;
|
return qid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SpotifyAccount::hasPlaylist(const QString& plId)
|
SpotifyAccount::hasPlaylist(const QString& plId)
|
||||||
{
|
{
|
||||||
return m_updaters.contains( plId );
|
return m_updaters.contains( plId );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Tomahawk::playlist_ptr
|
Tomahawk::playlist_ptr
|
||||||
SpotifyAccount::playlistForURI(const QString& plId)
|
SpotifyAccount::playlistForURI(const QString& plId)
|
||||||
{
|
{
|
||||||
@@ -1415,12 +1422,14 @@ SpotifyAccount::registerUpdaterForPlaylist( const QString& plId, SpotifyPlaylist
|
|||||||
m_updaters[ plId ] = updater;
|
m_updaters[ plId ] = updater;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::registerPlaylistInfo( const QString& name, const QString& plid, const QString &revid, const bool sync, const bool subscribed, const bool owner )
|
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 );
|
m_allSpotifyPlaylists[ plid ] = new SpotifyPlaylistInfo( name, plid, revid, sync, subscribed, owner );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::registerPlaylistInfo( SpotifyPlaylistInfo* info )
|
SpotifyAccount::registerPlaylistInfo( SpotifyPlaylistInfo* info )
|
||||||
{
|
{
|
||||||
@@ -1496,7 +1505,6 @@ SpotifyAccount::stopPlaylistSync( SpotifyPlaylistInfo* playlist, bool forceDontD
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccount::loadPlaylists()
|
SpotifyAccount::loadPlaylists()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user