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

* Fixed a ton of compiler warnings.

This commit is contained in:
Christian Muehlhaeuser
2013-04-05 15:42:01 +02:00
parent 07af484e3e
commit 4a76b561c4
20 changed files with 43 additions and 23 deletions

View File

@@ -122,11 +122,13 @@ Tomahawk::InfoSystem::XmppInfoPlugin::audioStarted( const Tomahawk::InfoSystem::
emit publishTune( url, info ); emit publishTune( url, info );
} }
void void
Tomahawk::InfoSystem::XmppInfoPlugin::audioPaused() Tomahawk::InfoSystem::XmppInfoPlugin::audioPaused()
{ {
} }
void void
Tomahawk::InfoSystem::XmppInfoPlugin::audioStopped() Tomahawk::InfoSystem::XmppInfoPlugin::audioStopped()
{ {

View File

@@ -20,6 +20,8 @@
#ifndef MPRISPLUGIN_H #ifndef MPRISPLUGIN_H
#define MPRISPLUGIN_H #define MPRISPLUGIN_H
#include "Query.h"
#include "Source.h"
#include "audio/AudioEngine.h" #include "audio/AudioEngine.h"
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infoplugins/InfoPluginDllMacro.h" #include "infoplugins/InfoPluginDllMacro.h"
@@ -144,7 +146,7 @@ public slots:
protected slots: protected slots:
virtual void init(); virtual void init();
virtual void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData ) virtual void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
{ {
Q_UNUSED( requestData ); Q_UNUSED( requestData );

View File

@@ -24,6 +24,7 @@
#include "PlaylistInterface.h" #include "PlaylistInterface.h"
#include "Artist.h" #include "Artist.h"
#include "Album.h" #include "Album.h"
#include "Source.h"
#include "utils/TomahawkUtils.h" #include "utils/TomahawkUtils.h"
#include "playlist/PlaylistUpdaterInterface.h" #include "playlist/PlaylistUpdaterInterface.h"

View File

@@ -55,7 +55,7 @@ DLLEXPORT QString accountTypeToString( AccountType type );
Q_DECLARE_FLAGS(AccountTypes, AccountType); Q_DECLARE_FLAGS(AccountTypes, AccountType);
inline QString generateId( const QString &factoryId ) inline QString generateId( const QString& factoryId )
{ {
QString uniq = QUuid::createUuid().toString().mid( 1, 8 ); QString uniq = QUuid::createUuid().toString().mid( 1, 8 );
return factoryId + "_" + uniq; return factoryId + "_" + uniq;
@@ -199,4 +199,5 @@ Q_DECLARE_INTERFACE( Tomahawk::Accounts::AccountFactory, "tomahawk.AccountFactor
Q_DECLARE_METATYPE( Tomahawk::Accounts::Account* ) Q_DECLARE_METATYPE( Tomahawk::Accounts::Account* )
Q_DECLARE_METATYPE( QList< Tomahawk::Accounts::Account* > ) Q_DECLARE_METATYPE( QList< Tomahawk::Accounts::Account* > )
Q_DECLARE_METATYPE( Tomahawk::Accounts::AccountTypes ) Q_DECLARE_METATYPE( Tomahawk::Accounts::AccountTypes )
#endif #endif

View File

@@ -25,6 +25,8 @@
#include "resolvers/ExternalResolverGui.h" #include "resolvers/ExternalResolverGui.h"
#include "Pipeline.h" #include "Pipeline.h"
#include "TomahawkSettings.h" #include "TomahawkSettings.h"
#include "Artist.h"
#include "Album.h"
#include "Source.h" #include "Source.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "qjson/parser.h" #include "qjson/parser.h"
@@ -416,7 +418,8 @@ ResolverAccount::removeFromConfig()
} }
void ResolverAccount::saveConfig() void
ResolverAccount::saveConfig()
{ {
Account::saveConfig(); Account::saveConfig();
if ( !m_resolver.isNull() ) if ( !m_resolver.isNull() )
@@ -441,6 +444,7 @@ ResolverAccount::resolverChanged()
emit connectionStateChanged( connectionState() ); emit connectionStateChanged( connectionState() );
} }
QPixmap QPixmap
ResolverAccount::icon() const ResolverAccount::icon() const
{ {

View File

@@ -137,6 +137,7 @@ private slots:
void resolverIconUpdated( const QString& ); void resolverIconUpdated( const QString& );
void loadIcon(); void loadIcon();
private: private:
// Created by factory, when user installs a new resolver // Created by factory, when user installs a new resolver
AtticaResolverAccount( const QString& accountId, const QString& path, const QString& atticaId, const QVariantHash& initialConfiguration = QVariantHash() ); AtticaResolverAccount( const QString& accountId, const QString& path, const QString& atticaId, const QVariantHash& initialConfiguration = QVariantHash() );

View File

@@ -106,13 +106,13 @@ public:
bool hasPlaylist( const QString& plId ); bool hasPlaylist( const QString& plId );
Tomahawk::playlist_ptr playlistForURI( const QString& plId ); Tomahawk::playlist_ptr playlistForURI( const QString& plId );
void registerUpdaterForPlaylist( const QString& plId, SpotifyPlaylistUpdater* updater ); void registerUpdaterForPlaylist( const QString& plId, SpotifyPlaylistUpdater* updater );
void registerPlaylistInfo( const QString& name, const QString& plid, const QString &revid, const bool sync, const bool subscribed , const bool owner = false); void registerPlaylistInfo( const QString& name, const QString& plid, const QString &revid, const bool sync, const bool subscribed , const bool owner = false );
void registerPlaylistInfo( SpotifyPlaylistInfo* info ); void registerPlaylistInfo( SpotifyPlaylistInfo* info );
void unregisterUpdater( const QString& plid ); void unregisterUpdater( const QString& plid );
bool deleteOnUnsync() const; bool deleteOnUnsync() const;
bool loveSync() const; bool loveSync() const;
void starTrack(const QString& artist, const QString&title, const bool starred); void starTrack( const QString& artist, const QString& title, const bool starred );
void setManualResolverPath( const QString& resolverPath ); void setManualResolverPath( const QString& resolverPath );
bool loggedIn() const; bool loggedIn() const;
@@ -123,7 +123,7 @@ public slots:
void aboutToShow( QAction* action, const Tomahawk::playlist_ptr& playlist ); void aboutToShow( QAction* action, const Tomahawk::playlist_ptr& playlist );
void syncActionTriggered( QAction* action ); void syncActionTriggered( QAction* action );
void subscribeActionTriggered( QAction* action ); void subscribeActionTriggered( QAction* action );
void atticaLoaded(Attica::Content::List); void atticaLoaded( Attica::Content::List );
void collaborateActionTriggered( QAction* action ); void collaborateActionTriggered( QAction* action );
private slots: private slots:
@@ -142,6 +142,7 @@ private slots:
void playlistCopyCreated( const QString& msgType, const QVariantMap& msg, const QVariant& extraData ); void playlistCopyCreated( const QString& msgType, const QVariantMap& msg, const QVariant& extraData );
void delayedInit(); void delayedInit();
void hookupAfterDeletion( bool autoEnable ); void hookupAfterDeletion( bool autoEnable );
private: private:
void init(); void init();
bool checkForResolver(); bool checkForResolver();
@@ -186,6 +187,7 @@ private:
}; };
} }
} }
Q_DECLARE_METATYPE( Tomahawk::Accounts::SpotifyPlaylistInfo* ) Q_DECLARE_METATYPE( Tomahawk::Accounts::SpotifyPlaylistInfo* )

View File

@@ -24,7 +24,6 @@
#include "DatabaseWorker.h" #include "DatabaseWorker.h"
#include "IdThreadWorker.h" #include "IdThreadWorker.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "Source.h"
#define DEFAULT_WORKER_THREADS 4 #define DEFAULT_WORKER_THREADS 4
#define MAX_WORKER_THREADS 16 #define MAX_WORKER_THREADS 16

View File

@@ -25,6 +25,7 @@
#include "Artist.h" #include "Artist.h"
#include "Album.h" #include "Album.h"
#include "Source.h"
#include "DatabaseCommand.h" #include "DatabaseCommand.h"
#include "DllMacro.h" #include "DllMacro.h"

View File

@@ -75,7 +75,6 @@ void
DatabaseCommand_Resolve::resolve( DatabaseImpl* lib ) DatabaseCommand_Resolve::resolve( DatabaseImpl* lib )
{ {
QList<Tomahawk::result_ptr> res; QList<Tomahawk::result_ptr> res;
typedef QPair<int, float> scorepair_t;
// STEP 1 // STEP 1
QList< QPair<int, float> > tracks = lib->search( m_query ); QList< QPair<int, float> > tracks = lib->search( m_query );

View File

@@ -34,6 +34,7 @@
#include "MetaPlaylistInterface.h" #include "MetaPlaylistInterface.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "utils/AnimatedSpinner.h" #include "utils/AnimatedSpinner.h"
#include "utils/PixmapDelegateFader.h"
#include "utils/TomahawkUtilsGui.h" #include "utils/TomahawkUtilsGui.h"
#include <QHeaderView> #include <QHeaderView>

View File

@@ -22,8 +22,9 @@
#include "PlaylistInterface.h" #include "PlaylistInterface.h"
#include "DllMacro.h" #include "DllMacro.h"
#include "Query.h" #include "Query.h"
#include "Typedefs.h"
#include "Result.h" #include "Result.h"
#include "Source.h"
#include "Typedefs.h"
namespace Tomahawk namespace Tomahawk
{ {

View File

@@ -19,7 +19,6 @@
#include "ExternalResolver.h" #include "ExternalResolver.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "Source.h"
Tomahawk::ExternalResolver::ErrorState Tomahawk::ExternalResolver::ErrorState
Tomahawk::ExternalResolver::error() const Tomahawk::ExternalResolver::error() const

View File

@@ -21,7 +21,9 @@
#ifndef EXTERNALRESOLVER_H #ifndef EXTERNALRESOLVER_H
#define EXTERNALRESOLVER_H #define EXTERNALRESOLVER_H
#include "Artist.h"
#include "Album.h"
#include "Source.h"
#include "Query.h" #include "Query.h"
#include "DllMacro.h" #include "DllMacro.h"
#include "Resolver.h" #include "Resolver.h"

View File

@@ -19,6 +19,7 @@
#ifndef SCRIPTCOMMAND_ALLALBUMS_H #ifndef SCRIPTCOMMAND_ALLALBUMS_H
#define SCRIPTCOMMAND_ALLALBUMS_H #define SCRIPTCOMMAND_ALLALBUMS_H
#include "Album.h"
#include "collection/AlbumsRequest.h" #include "collection/AlbumsRequest.h"
#include "collection/Collection.h" #include "collection/Collection.h"
#include "resolvers/ScriptCommand.h" #include "resolvers/ScriptCommand.h"
@@ -35,7 +36,7 @@ public:
virtual void enqueue(); virtual void enqueue();
virtual void setFilter( const QString& filter ); virtual void setFilter( const QString& filter );
signals: signals:
void albums( const QList< Tomahawk::album_ptr >& ); void albums( const QList< Tomahawk::album_ptr >& );
void done(); void done();
@@ -43,7 +44,7 @@ signals:
protected: protected:
virtual void exec(); virtual void exec();
virtual void reportFailure(); virtual void reportFailure();
private slots: private slots:
void onResolverDone( const QList< Tomahawk::album_ptr >& ); void onResolverDone( const QList< Tomahawk::album_ptr >& );

View File

@@ -19,6 +19,7 @@
#ifndef SCRIPTCOMMAND_ALLARTISTS_H #ifndef SCRIPTCOMMAND_ALLARTISTS_H
#define SCRIPTCOMMAND_ALLARTISTS_H #define SCRIPTCOMMAND_ALLARTISTS_H
#include "Artist.h"
#include "collection/ArtistsRequest.h" #include "collection/ArtistsRequest.h"
#include "collection/Collection.h" #include "collection/Collection.h"
#include "resolvers/ScriptCommand.h" #include "resolvers/ScriptCommand.h"
@@ -34,7 +35,7 @@ public:
virtual void enqueue(); virtual void enqueue();
void setFilter( const QString& filter ); void setFilter( const QString& filter );
signals: signals:
void artists( const QList< Tomahawk::artist_ptr >& ); void artists( const QList< Tomahawk::artist_ptr >& );
void done(); void done();

View File

@@ -19,6 +19,7 @@
#ifndef SCRIPTCOMMAND_ALLTRACKS_H #ifndef SCRIPTCOMMAND_ALLTRACKS_H
#define SCRIPTCOMMAND_ALLTRACKS_H #define SCRIPTCOMMAND_ALLTRACKS_H
#include "Query.h"
#include "collection/TracksRequest.h" #include "collection/TracksRequest.h"
#include "collection/Collection.h" #include "collection/Collection.h"
#include "resolvers/ScriptCommand.h" #include "resolvers/ScriptCommand.h"
@@ -33,7 +34,7 @@ public:
virtual ~ScriptCommand_AllTracks() {} virtual ~ScriptCommand_AllTracks() {}
virtual void enqueue(); virtual void enqueue();
signals: signals:
void tracks( const QList< Tomahawk::query_ptr >& ); void tracks( const QList< Tomahawk::query_ptr >& );
void done(); void done();
@@ -41,7 +42,7 @@ signals:
protected: protected:
virtual void exec(); virtual void exec();
virtual void reportFailure(); virtual void reportFailure();
private slots: private slots:
void onResolverDone( const QList< Tomahawk::query_ptr >& ); void onResolverDone( const QList< Tomahawk::query_ptr >& );

View File

@@ -22,6 +22,9 @@
#define SCRIPTRESOLVER_H #define SCRIPTRESOLVER_H
#include "Query.h" #include "Query.h"
#include "Artist.h"
#include "Album.h"
#include "collection/Collection.h"
#include "ExternalResolverGui.h" #include "ExternalResolverGui.h"
#include "DllMacro.h" #include "DllMacro.h"
@@ -71,9 +74,9 @@ public slots:
virtual void start(); virtual void start();
// TODO: implement. Or not. Not really an issue while Spotify doesn't do browsable personal cloud storage. // TODO: implement. Or not. Not really an issue while Spotify doesn't do browsable personal cloud storage.
virtual void artists( const Tomahawk::collection_ptr& collection ){} virtual void artists( const Tomahawk::collection_ptr& ) {}
virtual void albums( const Tomahawk::collection_ptr& collection, const Tomahawk::artist_ptr& artist ) {} virtual void albums( const Tomahawk::collection_ptr&, const Tomahawk::artist_ptr& ) {}
virtual void tracks( const Tomahawk::collection_ptr& collection, const Tomahawk::album_ptr& album ) {} virtual void tracks( const Tomahawk::collection_ptr&, const Tomahawk::album_ptr& ) {}
private slots: private slots:

View File

@@ -41,10 +41,9 @@ SoundcloudParser::SoundcloudParser( const QStringList& Urls, bool createNewPlayl
, m_single( false ) , m_single( false )
, m_trackMode( true ) , m_trackMode( true )
, m_createNewPlaylist( createNewPlaylist ) , m_createNewPlaylist( createNewPlaylist )
, m_getLikes( false )
, m_browseJob( 0 ) , m_browseJob( 0 )
, m_type( DropJob::All ) , m_type( DropJob::All )
, m_getLikes( false )
{ {
foreach ( const QString& url, Urls ) foreach ( const QString& url, Urls )
lookupUrl( url ); lookupUrl( url );
@@ -56,9 +55,9 @@ SoundcloudParser::SoundcloudParser( const QString& Url, bool createNewPlaylist,
, m_single( true ) , m_single( true )
, m_trackMode( true ) , m_trackMode( true )
, m_createNewPlaylist( createNewPlaylist ) , m_createNewPlaylist( createNewPlaylist )
, m_getLikes( false )
, m_browseJob( 0 ) , m_browseJob( 0 )
, m_type( DropJob::All ) , m_type( DropJob::All )
, m_getLikes( false )
{ {
lookupUrl( Url ); lookupUrl( Url );
} }

View File

@@ -37,7 +37,7 @@ HeaderWidget::~HeaderWidget()
void void
HeaderWidget::paintEvent( QPaintEvent* e ) HeaderWidget::paintEvent( QPaintEvent* /* event */ )
{ {
QStylePainter p( this ); QStylePainter p( this );
QRect r = rect(); QRect r = rect();