From a2f139c204595a9784bf050e65079dbbae6bc37f Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Wed, 14 Sep 2011 16:40:14 -0400 Subject: [PATCH] Fix warnings that led to shared pointers not being correctly deleted. See upcoming email to tomahawk-devel@ for how to avoi them in the future, this was a PITA and I don't want to do it again. --- src/PipelineStatusView.h | 1 + src/audiocontrols.h | 1 + src/libtomahawk/CMakeLists.txt | 2 + src/libtomahawk/album.cpp | 12 +++++ src/libtomahawk/album.h | 7 ++- src/libtomahawk/artist.cpp | 6 +++ src/libtomahawk/artist.h | 4 +- src/libtomahawk/collection.cpp | 6 +++ src/libtomahawk/collection.h | 3 +- src/libtomahawk/contextmenu.cpp | 12 ++++- src/libtomahawk/contextmenu.h | 3 +- src/libtomahawk/database/database.h | 2 +- src/libtomahawk/database/databasecommand.cpp | 16 +++++++ src/libtomahawk/database/databasecommand.h | 9 ++-- .../database/databasecommand_allalbums.cpp | 17 +++++++ .../database/databasecommand_allalbums.h | 12 ++--- .../database/databasecommand_allartists.cpp | 11 +++++ .../database/databasecommand_allartists.h | 9 +--- .../database/databasecommand_alltracks.h | 1 + .../databasecommand_createdynamicplaylist.cpp | 11 +++++ .../databasecommand_createdynamicplaylist.h | 9 +--- .../databasecommand_createplaylist.cpp | 11 +++++ .../database/databasecommand_createplaylist.h | 11 ++--- .../database/databasecommand_loadfile.h | 2 +- .../databasecommand_modifyplaylist.cpp | 3 ++ .../database/databasecommand_modifyplaylist.h | 1 + .../database/databasecommand_resolve.cpp | 2 + .../database/databasecommand_resolve.h | 3 ++ .../infosystem/infoplugins/mac/adium.h | 2 +- src/libtomahawk/network/controlconnection.cpp | 5 +++ src/libtomahawk/network/controlconnection.h | 2 +- src/libtomahawk/playlist/albumproxymodel.cpp | 13 ++++++ src/libtomahawk/playlist/albumproxymodel.h | 4 +- .../playlist/customplaylistview.cpp | 2 + src/libtomahawk/playlist/customplaylistview.h | 2 +- .../dynamic/DynamicPlaylistRevision.cpp | 36 +++++++++++++++ .../dynamic/DynamicPlaylistRevision.h | 15 ++----- .../dynamic/echonest/EchonestSteerer.cpp | 4 +- .../playlist/dynamic/widgets/DynamicWidget.h | 2 +- src/libtomahawk/playlist/trackview.cpp | 1 + src/libtomahawk/playlist/treemodel.cpp | 5 +++ src/libtomahawk/playlist/treemodel.h | 2 +- src/libtomahawk/playlistinterface.cpp | 45 +++++++++++++++++++ src/libtomahawk/playlistinterface.h | 13 +++--- src/libtomahawk/query.cpp | 6 +++ src/libtomahawk/query.h | 4 +- src/libtomahawk/result.h | 1 + src/libtomahawk/sip/SipPlugin.cpp | 2 + src/libtomahawk/sip/SipPlugin.h | 3 +- src/libtomahawk/sourceplaylistinterface.cpp | 16 ++++++- src/libtomahawk/sourceplaylistinterface.h | 7 ++- src/libtomahawk/typedefs.h | 2 +- src/libtomahawk/utils/jspfloader.cpp | 16 +++++++ src/libtomahawk/utils/jspfloader.h | 9 ++-- src/libtomahawk/utils/spotifyparser.h | 1 + src/libtomahawk/utils/xspfloader.cpp | 14 ++++++ src/libtomahawk/utils/xspfloader.h | 14 ++---- .../widgets/SocialPlaylistWidget.h | 3 +- .../widgets/infowidgets/ArtistInfoWidget.h | 1 + src/sip/zeroconf/zeroconf.cpp | 4 ++ src/sip/zeroconf/zeroconf.h | 8 ++-- src/sourcetree/sourcesmodel.h | 1 + 62 files changed, 350 insertions(+), 102 deletions(-) create mode 100644 src/libtomahawk/playlist/dynamic/DynamicPlaylistRevision.cpp create mode 100644 src/libtomahawk/playlistinterface.cpp diff --git a/src/PipelineStatusView.h b/src/PipelineStatusView.h index 81db8c80c..1f4b2239f 100644 --- a/src/PipelineStatusView.h +++ b/src/PipelineStatusView.h @@ -23,6 +23,7 @@ #include "typedefs.h" #include "widgets/animatedsplitter.h" +#include "query.h" class StreamConnection; diff --git a/src/audiocontrols.h b/src/audiocontrols.h index dd99bfbf7..0d4c2a973 100644 --- a/src/audiocontrols.h +++ b/src/audiocontrols.h @@ -25,6 +25,7 @@ #include "result.h" #include "playlistinterface.h" #include "infosystem/infosystem.h" +#include "query.h" class QDropEvent; class QDragEnterEvent; diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index 4eff32a34..8cf19fe80 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -32,6 +32,7 @@ set( libSources globalactionmanager.cpp contextmenu.cpp dropjob.cpp + playlistinterface.cpp sip/SipPlugin.cpp sip/SipHandler.cpp @@ -145,6 +146,7 @@ set( libSources playlist/dynamic/GeneratorInterface.cpp playlist/dynamic/DynamicView.cpp playlist/dynamic/DynamicModel.cpp + playlist/dynamic/DynamicPlaylistRevision.cpp playlist/dynamic/echonest/EchonestGenerator.cpp playlist/dynamic/echonest/EchonestControl.cpp playlist/dynamic/echonest/EchonestSteerer.cpp diff --git a/src/libtomahawk/album.cpp b/src/libtomahawk/album.cpp index 1eb180686..ef4426bf3 100644 --- a/src/libtomahawk/album.cpp +++ b/src/libtomahawk/album.cpp @@ -28,6 +28,8 @@ using namespace Tomahawk; +Album::Album() {} +Album::~Album() {} album_ptr Album::get( const Tomahawk::artist_ptr& artist, const QString& name, bool autoCreate ) @@ -98,6 +100,11 @@ Album::siblingItem( int itemsAway ) return m_currentItem; } +result_ptr +Album::currentItem() const +{ + return m_currentItem; +} bool Album::hasNextItem() @@ -110,6 +117,11 @@ Album::hasNextItem() return true; } +artist_ptr +Album::artist() const +{ + return m_artist; +} QList Album::tracks() diff --git a/src/libtomahawk/album.h b/src/libtomahawk/album.h index 4b62cc4dc..1681fb3ea 100644 --- a/src/libtomahawk/album.h +++ b/src/libtomahawk/album.h @@ -38,10 +38,11 @@ public: static album_ptr get( unsigned int id, const QString& name, const Tomahawk::artist_ptr& artist ); Album( unsigned int id, const QString& name, const Tomahawk::artist_ptr& artist ); + ~Album(); unsigned int id() const { return m_id; } QString name() const { return m_name; } - artist_ptr artist() const { return m_artist; } + artist_ptr artist() const; QList tracks(); @@ -51,7 +52,7 @@ public: virtual Tomahawk::result_ptr siblingItem( int itemsAway ); virtual bool hasNextItem(); - virtual Tomahawk::result_ptr currentItem() const { return m_currentItem; } + virtual Tomahawk::result_ptr currentItem() const; virtual PlaylistInterface::RepeatMode repeatMode() const { return PlaylistInterface::NoRepeat; } virtual bool shuffled() const { return false; } @@ -75,6 +76,8 @@ private slots: void onTracksAdded( const QList& tracks ); private: + Album(); + unsigned int m_id; QString m_name; diff --git a/src/libtomahawk/artist.cpp b/src/libtomahawk/artist.cpp index 00b6a14c6..f5c852b64 100644 --- a/src/libtomahawk/artist.cpp +++ b/src/libtomahawk/artist.cpp @@ -120,6 +120,12 @@ Artist::hasNextItem() return true; } +result_ptr +Artist::currentItem() const +{ + return m_currentItem; +} + QList Artist::tracks() diff --git a/src/libtomahawk/artist.h b/src/libtomahawk/artist.h index afd1e40fd..b85fabbbd 100644 --- a/src/libtomahawk/artist.h +++ b/src/libtomahawk/artist.h @@ -53,7 +53,7 @@ public: virtual Tomahawk::result_ptr siblingItem( int itemsAway ); virtual bool hasNextItem(); - virtual Tomahawk::result_ptr currentItem() const { return m_currentItem; } + virtual Tomahawk::result_ptr currentItem() const; virtual PlaylistInterface::RepeatMode repeatMode() const { return PlaylistInterface::NoRepeat; } virtual bool shuffled() const { return false; } @@ -77,6 +77,8 @@ private slots: void onTracksAdded( const QList& tracks ); private: + Q_DISABLE_COPY(Artist) + unsigned int m_id; QString m_name; QString m_sortname; diff --git a/src/libtomahawk/collection.cpp b/src/libtomahawk/collection.cpp index c5aadf495..8e6f8b9c6 100644 --- a/src/libtomahawk/collection.cpp +++ b/src/libtomahawk/collection.cpp @@ -170,6 +170,12 @@ Collection::station( const QString& guid ) return m_stations.value( guid, dynplaylist_ptr() ); } +QList< query_ptr > +Collection::tracks() const +{ + return m_tracks; +} + void Collection::setPlaylists( const QList& plists ) diff --git a/src/libtomahawk/collection.h b/src/libtomahawk/collection.h index 0a1e1b8a6..c27ea4ba6 100644 --- a/src/libtomahawk/collection.h +++ b/src/libtomahawk/collection.h @@ -35,6 +35,7 @@ #include "functimeout.h" #include "playlist.h" #include "playlist/dynamic/DynamicPlaylist.h" +#include "query.h" #include "dllmacro.h" @@ -74,7 +75,7 @@ public: virtual QList< Tomahawk::playlist_ptr > playlists() { return m_playlists.values(); } virtual QList< Tomahawk::dynplaylist_ptr > autoPlaylists() { return m_autoplaylists.values(); } virtual QList< Tomahawk::dynplaylist_ptr > stations() { return m_stations.values(); } - virtual QList< Tomahawk::query_ptr > tracks() { return m_tracks; } + virtual QList< Tomahawk::query_ptr > tracks() const; const source_ptr& source() const; unsigned int lastmodified() const { return m_lastmodified; } diff --git a/src/libtomahawk/contextmenu.cpp b/src/libtomahawk/contextmenu.cpp index 5019d1b7c..75acadf55 100644 --- a/src/libtomahawk/contextmenu.cpp +++ b/src/libtomahawk/contextmenu.cpp @@ -21,7 +21,10 @@ #include "globalactionmanager.h" #include "playlistview.h" #include "viewmanager.h" - +#include "query.h" +#include "source.h" +#include "artist.h" +#include "album.h" #include "utils/logger.h" using namespace Tomahawk; @@ -36,6 +39,8 @@ ContextMenu::ContextMenu( QWidget* parent ) m_supportedActions = ActionPlay | ActionQueue | ActionCopyLink; } +ContextMenu::~ContextMenu() +{} void ContextMenu::clear() @@ -47,6 +52,11 @@ ContextMenu::clear() m_artists.clear(); } +unsigned int +ContextMenu::itemCount() const +{ + return m_queries.count() + m_artists.count() + m_albums.count(); +} void ContextMenu::setQueries( const QList& queries ) diff --git a/src/libtomahawk/contextmenu.h b/src/libtomahawk/contextmenu.h index ea0b776d3..3c1842948 100644 --- a/src/libtomahawk/contextmenu.h +++ b/src/libtomahawk/contextmenu.h @@ -37,6 +37,7 @@ public: { ActionPlay = 1, ActionQueue = 2, ActionDelete = 4, ActionCopyLink = 8 }; explicit ContextMenu( QWidget* parent = 0 ); + virtual ~ContextMenu(); int supportedActions() const { return m_supportedActions; } void setSupportedActions( int actions ) { m_supportedActions = actions; } @@ -52,7 +53,7 @@ public: void clear(); - unsigned int itemCount() const { return m_queries.count() + m_artists.count() + m_albums.count(); } + unsigned int itemCount() const; signals: void triggered( int action ); diff --git a/src/libtomahawk/database/database.h b/src/libtomahawk/database/database.h index 323a27527..89581fee8 100644 --- a/src/libtomahawk/database/database.h +++ b/src/libtomahawk/database/database.h @@ -24,10 +24,10 @@ #include "artist.h" #include "album.h" +#include "databasecommand.h" #include "dllmacro.h" -class DatabaseCommand; class DatabaseImpl; class DatabaseWorker; diff --git a/src/libtomahawk/database/databasecommand.cpp b/src/libtomahawk/database/databasecommand.cpp index 30034f0dc..efa32f71e 100644 --- a/src/libtomahawk/database/databasecommand.cpp +++ b/src/libtomahawk/database/databasecommand.cpp @@ -49,6 +49,10 @@ DatabaseCommand::DatabaseCommand( const source_ptr& src, QObject* parent ) //qDebug() << Q_FUNC_INFO; } +DatabaseCommand::DatabaseCommand( const DatabaseCommand& other ) + : QObject( other.parent() ) +{ +} DatabaseCommand::~DatabaseCommand() { @@ -68,6 +72,18 @@ DatabaseCommand::_exec( DatabaseImpl* lib ) } +void +DatabaseCommand::setSource( const Tomahawk::source_ptr& s ) +{ + m_source = s; +} + +const Tomahawk::source_ptr& +DatabaseCommand::source() const +{ + return m_source; +} + DatabaseCommand* DatabaseCommand::factory( const QVariant& op, const source_ptr& source ) { diff --git a/src/libtomahawk/database/databasecommand.h b/src/libtomahawk/database/databasecommand.h index 55fb8bb0d..4b31c0fff 100644 --- a/src/libtomahawk/database/databasecommand.h +++ b/src/libtomahawk/database/databasecommand.h @@ -47,10 +47,7 @@ public: explicit DatabaseCommand( QObject* parent = 0 ); explicit DatabaseCommand( const Tomahawk::source_ptr& src, QObject* parent = 0 ); - DatabaseCommand( const DatabaseCommand &other ) - : QObject( other.parent() ) - { - } + DatabaseCommand( const DatabaseCommand &other ); virtual ~DatabaseCommand(); @@ -69,8 +66,8 @@ public: void postCommit() { postCommitHook(); emit committed(); } virtual void postCommitHook(){}; - void setSource( const Tomahawk::source_ptr& s ) { m_source = s; } - const Tomahawk::source_ptr& source() const { return m_source; } + void setSource( const Tomahawk::source_ptr& s ); + const Tomahawk::source_ptr& source() const; virtual bool loggable() const { return false; } virtual bool singletonCmd() const { return false; } diff --git a/src/libtomahawk/database/databasecommand_allalbums.cpp b/src/libtomahawk/database/databasecommand_allalbums.cpp index 904cf315f..b7983a223 100644 --- a/src/libtomahawk/database/databasecommand_allalbums.cpp +++ b/src/libtomahawk/database/databasecommand_allalbums.cpp @@ -26,6 +26,23 @@ #include "utils/tomahawkutils.h" #include "utils/logger.h" +DatabaseCommand_AllAlbums::DatabaseCommand_AllAlbums( const Tomahawk::collection_ptr &collection, const Tomahawk::artist_ptr &artist, QObject *parent ) + : DatabaseCommand( parent ) + , m_collection( collection ) + , m_artist( artist ) + , m_amount( 0 ) + , m_sortOrder( DatabaseCommand_AllAlbums::None ) + , m_sortDescending( false ) +{} + +DatabaseCommand_AllAlbums::~DatabaseCommand_AllAlbums() +{} + +void +DatabaseCommand_AllAlbums::setArtist( const Tomahawk::artist_ptr &artist ) +{ + m_artist = artist; +} void DatabaseCommand_AllAlbums::execForArtist( DatabaseImpl* dbi ) diff --git a/src/libtomahawk/database/databasecommand_allalbums.h b/src/libtomahawk/database/databasecommand_allalbums.h index cc6dfb473..c75c6c2b1 100644 --- a/src/libtomahawk/database/databasecommand_allalbums.h +++ b/src/libtomahawk/database/databasecommand_allalbums.h @@ -37,14 +37,8 @@ public: ModificationTime = 1 }; - explicit DatabaseCommand_AllAlbums( const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr(), const Tomahawk::artist_ptr& artist = Tomahawk::artist_ptr(), QObject* parent = 0 ) - : DatabaseCommand( parent ) - , m_collection( collection ) - , m_artist( artist ) - , m_amount( 0 ) - , m_sortOrder( DatabaseCommand_AllAlbums::None ) - , m_sortDescending( false ) - {} + explicit DatabaseCommand_AllAlbums( const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr(), const Tomahawk::artist_ptr& artist = Tomahawk::artist_ptr(), QObject* parent = 0 ); + virtual ~DatabaseCommand_AllAlbums(); virtual void exec( DatabaseImpl* ); @@ -54,7 +48,7 @@ public: void execForCollection( DatabaseImpl* ); void execForArtist( DatabaseImpl* ); - void setArtist( const Tomahawk::artist_ptr& artist ) { m_artist = artist; } + void setArtist( const Tomahawk::artist_ptr& artist ); void setLimit( unsigned int amount ) { m_amount = amount; } void setSortOrder( DatabaseCommand_AllAlbums::SortOrder order ) { m_sortOrder = order; } void setSortDescending( bool descending ) { m_sortDescending = descending; } diff --git a/src/libtomahawk/database/databasecommand_allartists.cpp b/src/libtomahawk/database/databasecommand_allartists.cpp index fc3887e28..5e421d850 100644 --- a/src/libtomahawk/database/databasecommand_allartists.cpp +++ b/src/libtomahawk/database/databasecommand_allartists.cpp @@ -26,6 +26,17 @@ #include "utils/tomahawkutils.h" #include "utils/logger.h" +DatabaseCommand_AllArtists::DatabaseCommand_AllArtists( const Tomahawk::collection_ptr &collection, QObject *parent ) + : DatabaseCommand( parent ) + , m_collection( collection ) + , m_amount( 0 ) + , m_sortOrder( DatabaseCommand_AllArtists::None ) + , m_sortDescending( false ) +{} + +DatabaseCommand_AllArtists::~DatabaseCommand_AllArtists() +{ +} void DatabaseCommand_AllArtists::exec( DatabaseImpl* dbi ) diff --git a/src/libtomahawk/database/databasecommand_allartists.h b/src/libtomahawk/database/databasecommand_allartists.h index 3a80791e8..a021a78a1 100644 --- a/src/libtomahawk/database/databasecommand_allartists.h +++ b/src/libtomahawk/database/databasecommand_allartists.h @@ -36,13 +36,8 @@ public: ModificationTime = 1 }; - explicit DatabaseCommand_AllArtists( const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr(), QObject* parent = 0 ) - : DatabaseCommand( parent ) - , m_collection( collection ) - , m_amount( 0 ) - , m_sortOrder( DatabaseCommand_AllArtists::None ) - , m_sortDescending( false ) - {} + explicit DatabaseCommand_AllArtists( const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr(), QObject* parent = 0 ); + virtual ~DatabaseCommand_AllArtists(); virtual void exec( DatabaseImpl* ); diff --git a/src/libtomahawk/database/databasecommand_alltracks.h b/src/libtomahawk/database/databasecommand_alltracks.h index 89bd31874..e8e109b5c 100644 --- a/src/libtomahawk/database/databasecommand_alltracks.h +++ b/src/libtomahawk/database/databasecommand_alltracks.h @@ -25,6 +25,7 @@ #include "databasecommand.h" #include "collection.h" #include "typedefs.h" +#include "query.h" #include "dllmacro.h" diff --git a/src/libtomahawk/database/databasecommand_createdynamicplaylist.cpp b/src/libtomahawk/database/databasecommand_createdynamicplaylist.cpp index e90b48713..988fdbb9b 100644 --- a/src/libtomahawk/database/databasecommand_createdynamicplaylist.cpp +++ b/src/libtomahawk/database/databasecommand_createdynamicplaylist.cpp @@ -52,6 +52,17 @@ DatabaseCommand_CreateDynamicPlaylist::DatabaseCommand_CreateDynamicPlaylist( co tDebug() << Q_FUNC_INFO << "creating dynamiccreatecommand 2"; } +DatabaseCommand_CreateDynamicPlaylist::~DatabaseCommand_CreateDynamicPlaylist() +{} + +QVariant +DatabaseCommand_CreateDynamicPlaylist::playlistV() const +{ + if( m_v.isNull() ) + return QJson::QObjectHelper::qobject2qvariant( (QObject*)m_playlist.data() ); + else + return m_v; +} void DatabaseCommand_CreateDynamicPlaylist::exec( DatabaseImpl* lib ) diff --git a/src/libtomahawk/database/databasecommand_createdynamicplaylist.h b/src/libtomahawk/database/databasecommand_createdynamicplaylist.h index 51ec3ae4b..c935e26e5 100644 --- a/src/libtomahawk/database/databasecommand_createdynamicplaylist.h +++ b/src/libtomahawk/database/databasecommand_createdynamicplaylist.h @@ -37,6 +37,7 @@ class DatabaseCommand_CreateDynamicPlaylist : public DatabaseCommand_CreatePlayl public: explicit DatabaseCommand_CreateDynamicPlaylist( QObject* parent = 0 ); explicit DatabaseCommand_CreateDynamicPlaylist( const Tomahawk::source_ptr& author, const Tomahawk::dynplaylist_ptr& playlist, bool autoLoad = true ); + virtual ~DatabaseCommand_CreateDynamicPlaylist(); QString commandname() const { return "createdynamicplaylist"; } @@ -46,13 +47,7 @@ public: virtual bool loggable() const { return m_autoLoad; } - QVariant playlistV() const - { - if( m_v.isNull() ) - return QJson::QObjectHelper::qobject2qvariant( (QObject*)m_playlist.data() ); - else - return m_v; - } + QVariant playlistV() const; void setPlaylistV( const QVariant& v ) { diff --git a/src/libtomahawk/database/databasecommand_createplaylist.cpp b/src/libtomahawk/database/databasecommand_createplaylist.cpp index 38fae2589..00f211758 100644 --- a/src/libtomahawk/database/databasecommand_createplaylist.cpp +++ b/src/libtomahawk/database/databasecommand_createplaylist.cpp @@ -45,6 +45,8 @@ DatabaseCommand_CreatePlaylist::DatabaseCommand_CreatePlaylist( const source_ptr { } +DatabaseCommand_CreatePlaylist::~DatabaseCommand_CreatePlaylist() +{} void DatabaseCommand_CreatePlaylist::exec( DatabaseImpl* lib ) @@ -52,6 +54,15 @@ DatabaseCommand_CreatePlaylist::exec( DatabaseImpl* lib ) createPlaylist( lib, false ); } +QVariant +DatabaseCommand_CreatePlaylist::playlistV() const +{ + if( m_v.isNull() ) + return QJson::QObjectHelper::qobject2qvariant( (QObject*)m_playlist.data() ); + else + return m_v; + } + void DatabaseCommand_CreatePlaylist::postCommitHook() diff --git a/src/libtomahawk/database/databasecommand_createplaylist.h b/src/libtomahawk/database/databasecommand_createplaylist.h index 02d38a1eb..558a3cf3a 100644 --- a/src/libtomahawk/database/databasecommand_createplaylist.h +++ b/src/libtomahawk/database/databasecommand_createplaylist.h @@ -33,6 +33,7 @@ Q_PROPERTY( QVariant playlist READ playlistV WRITE setPlaylistV ) public: explicit DatabaseCommand_CreatePlaylist( QObject* parent = 0 ); explicit DatabaseCommand_CreatePlaylist( const Tomahawk::source_ptr& author, const Tomahawk::playlist_ptr& playlist ); + virtual ~DatabaseCommand_CreatePlaylist(); QString commandname() const { return "createplaylist"; } @@ -40,13 +41,7 @@ public: virtual void postCommitHook(); virtual bool doesMutates() const { return true; } - QVariant playlistV() const - { - if( m_v.isNull() ) - return QJson::QObjectHelper::qobject2qvariant( (QObject*)m_playlist.data() ); - else - return m_v; - } + QVariant playlistV() const; void setPlaylistV( const QVariant& v ) { @@ -58,7 +53,7 @@ protected: virtual bool report() { return m_report; } - void setPlaylist( const Tomahawk::playlist_ptr& playlist ) { m_playlist = playlist; } + void setPlaylist( const Tomahawk::playlist_ptr& playlist ); QVariant m_v; diff --git a/src/libtomahawk/database/databasecommand_loadfile.h b/src/libtomahawk/database/databasecommand_loadfile.h index 7d40c281c..5165b3971 100644 --- a/src/libtomahawk/database/databasecommand_loadfile.h +++ b/src/libtomahawk/database/databasecommand_loadfile.h @@ -24,7 +24,7 @@ #include #include "databasecommand.h" - +#include "result.h" #include "dllmacro.h" class DLLEXPORT DatabaseCommand_LoadFile : public DatabaseCommand diff --git a/src/libtomahawk/database/databasecommand_modifyplaylist.cpp b/src/libtomahawk/database/databasecommand_modifyplaylist.cpp index 405ececa7..d084a758d 100644 --- a/src/libtomahawk/database/databasecommand_modifyplaylist.cpp +++ b/src/libtomahawk/database/databasecommand_modifyplaylist.cpp @@ -19,6 +19,7 @@ #include "databasecommand_modifyplaylist.h" #include "utils/logger.h" +#include "playlist.h" using namespace Tomahawk; @@ -31,6 +32,8 @@ DatabaseCommand_ModifyPlaylist::DatabaseCommand_ModifyPlaylist( Playlist* playli { } +DatabaseCommand_ModifyPlaylist::~DatabaseCommand_ModifyPlaylist() +{} void DatabaseCommand_ModifyPlaylist::exec( DatabaseImpl* lib ) diff --git a/src/libtomahawk/database/databasecommand_modifyplaylist.h b/src/libtomahawk/database/databasecommand_modifyplaylist.h index 430f7401f..370f6e972 100644 --- a/src/libtomahawk/database/databasecommand_modifyplaylist.h +++ b/src/libtomahawk/database/databasecommand_modifyplaylist.h @@ -41,6 +41,7 @@ public: }; explicit DatabaseCommand_ModifyPlaylist( Tomahawk::Playlist* playlist, const QList< Tomahawk::plentry_ptr >& entries, Mode mode ); + virtual ~DatabaseCommand_ModifyPlaylist(); virtual bool doesMutates() const { return true; } diff --git a/src/libtomahawk/database/databasecommand_resolve.cpp b/src/libtomahawk/database/databasecommand_resolve.cpp index 053ac7e06..8b841ca51 100644 --- a/src/libtomahawk/database/databasecommand_resolve.cpp +++ b/src/libtomahawk/database/databasecommand_resolve.cpp @@ -32,6 +32,8 @@ DatabaseCommand_Resolve::DatabaseCommand_Resolve( const query_ptr& query ) { } +DatabaseCommand_Resolve::~DatabaseCommand_Resolve() +{} void DatabaseCommand_Resolve::exec( DatabaseImpl* lib ) diff --git a/src/libtomahawk/database/databasecommand_resolve.h b/src/libtomahawk/database/databasecommand_resolve.h index 75fca7bf5..5049ac280 100644 --- a/src/libtomahawk/database/databasecommand_resolve.h +++ b/src/libtomahawk/database/databasecommand_resolve.h @@ -32,6 +32,7 @@ class DLLEXPORT DatabaseCommand_Resolve : public DatabaseCommand Q_OBJECT public: explicit DatabaseCommand_Resolve( const Tomahawk::query_ptr& query ); + virtual ~DatabaseCommand_Resolve(); virtual QString commandname() const { return "dbresolve"; } virtual bool doesMutates() const { return false; } @@ -44,6 +45,8 @@ signals: public slots: private: + DatabaseCommand_Resolve(); + void fullTextResolve( DatabaseImpl* lib ); void resolve( DatabaseImpl* lib ); diff --git a/src/libtomahawk/infosystem/infoplugins/mac/adium.h b/src/libtomahawk/infosystem/infoplugins/mac/adium.h index 9833fe82b..70baf85c3 100644 --- a/src/libtomahawk/infosystem/infoplugins/mac/adium.h +++ b/src/libtomahawk/infosystem/infoplugins/mac/adium.h @@ -22,4 +22,4 @@ void script( const char* status ); -#endif ADIUM_TOMAHAWK_H +#endif diff --git a/src/libtomahawk/network/controlconnection.cpp b/src/libtomahawk/network/controlconnection.cpp index 32220853a..e07bfe40b 100644 --- a/src/libtomahawk/network/controlconnection.cpp +++ b/src/libtomahawk/network/controlconnection.cpp @@ -63,6 +63,11 @@ ControlConnection::~ControlConnection() m_dbsyncconn->deleteLater(); } +source_ptr +ControlConnection::source() const +{ + return m_source; +} Connection* ControlConnection::clone() diff --git a/src/libtomahawk/network/controlconnection.h b/src/libtomahawk/network/controlconnection.h index 42fb3a7f0..0cfa02610 100644 --- a/src/libtomahawk/network/controlconnection.h +++ b/src/libtomahawk/network/controlconnection.h @@ -45,7 +45,7 @@ public: DBSyncConnection* dbSyncConnection(); - Tomahawk::source_ptr source() const { return m_source; } + Tomahawk::source_ptr source() const; protected: virtual void setup(); diff --git a/src/libtomahawk/playlist/albumproxymodel.cpp b/src/libtomahawk/playlist/albumproxymodel.cpp index ae5a32d73..08eff9910 100644 --- a/src/libtomahawk/playlist/albumproxymodel.cpp +++ b/src/libtomahawk/playlist/albumproxymodel.cpp @@ -61,6 +61,19 @@ AlbumProxyModel::setSourceAlbumModel( AlbumModel* sourceModel ) QSortFilterProxyModel::setSourceModel( sourceModel ); } +QList< Tomahawk::query_ptr > +AlbumProxyModel::tracks() +{ + Q_ASSERT( FALSE ); + QList queries; + return queries; +} + +Tomahawk::result_ptr +AlbumProxyModel::currentItem() const +{ + return Tomahawk::result_ptr(); +} void AlbumProxyModel::setFilter( const QString& pattern ) diff --git a/src/libtomahawk/playlist/albumproxymodel.h b/src/libtomahawk/playlist/albumproxymodel.h index 991ec6b57..d0d0b40ad 100644 --- a/src/libtomahawk/playlist/albumproxymodel.h +++ b/src/libtomahawk/playlist/albumproxymodel.h @@ -37,7 +37,7 @@ public: virtual void setSourceAlbumModel( AlbumModel* sourceModel ); virtual void setSourceModel( QAbstractItemModel* sourceModel ); - virtual QList tracks() { Q_ASSERT( FALSE ); QList queries; return queries; } + virtual QList tracks(); virtual int unfilteredTrackCount() const { return sourceModel()->rowCount( QModelIndex() ); } virtual int trackCount() const { return rowCount( QModelIndex() ); } @@ -47,7 +47,7 @@ public: virtual void removeIndexes( const QList& indexes ); virtual bool hasNextItem() { return true; } - virtual Tomahawk::result_ptr currentItem() const { return Tomahawk::result_ptr(); } + virtual Tomahawk::result_ptr currentItem() const; virtual Tomahawk::result_ptr siblingItem( int direction ); virtual void setFilter( const QString& pattern ); diff --git a/src/libtomahawk/playlist/customplaylistview.cpp b/src/libtomahawk/playlist/customplaylistview.cpp index d2306f4dd..625bce3d4 100644 --- a/src/libtomahawk/playlist/customplaylistview.cpp +++ b/src/libtomahawk/playlist/customplaylistview.cpp @@ -51,6 +51,8 @@ CustomPlaylistView::CustomPlaylistView( CustomPlaylistView::PlaylistType type, c } } +CustomPlaylistView::~CustomPlaylistView() +{} void CustomPlaylistView::generateTracks() diff --git a/src/libtomahawk/playlist/customplaylistview.h b/src/libtomahawk/playlist/customplaylistview.h index 2cf891f79..0ed8dba21 100644 --- a/src/libtomahawk/playlist/customplaylistview.h +++ b/src/libtomahawk/playlist/customplaylistview.h @@ -37,7 +37,7 @@ public: }; explicit CustomPlaylistView( PlaylistType type, const source_ptr& s, QWidget* parent = 0 ); - virtual ~CustomPlaylistView() {} + virtual ~CustomPlaylistView(); virtual bool showFilter() const { return false; } virtual bool showStatsBar() const { return false; } diff --git a/src/libtomahawk/playlist/dynamic/DynamicPlaylistRevision.cpp b/src/libtomahawk/playlist/dynamic/DynamicPlaylistRevision.cpp new file mode 100644 index 000000000..10bbaf4ed --- /dev/null +++ b/src/libtomahawk/playlist/dynamic/DynamicPlaylistRevision.cpp @@ -0,0 +1,36 @@ +/* === This file is part of Tomahawk Player - === + * + * Copyright 2010-2011, Leo Franchi + * + * Tomahawk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Tomahawk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Tomahawk. If not, see . + */ + +#include "DynamicPlaylistRevision.h" + +#include "dynamic/DynamicControl.h" + +using namespace Tomahawk; + +DynamicPlaylistRevision::DynamicPlaylistRevision(const PlaylistRevision &other) +{ + revisionguid = other.revisionguid; + oldrevisionguid = other.oldrevisionguid; + newlist = other.newlist; + added = other.added; + removed = other.removed; + applied = other.applied; +} + +DynamicPlaylistRevision::DynamicPlaylistRevision() +{} diff --git a/src/libtomahawk/playlist/dynamic/DynamicPlaylistRevision.h b/src/libtomahawk/playlist/dynamic/DynamicPlaylistRevision.h index da89dc29e..1374bc087 100644 --- a/src/libtomahawk/playlist/dynamic/DynamicPlaylistRevision.h +++ b/src/libtomahawk/playlist/dynamic/DynamicPlaylistRevision.h @@ -1,6 +1,6 @@ /* === This file is part of Tomahawk Player - === * - * Copyright 2010-2011, Christian Muehlhaeuser + * Copyright 2010-2011, Leo Franchi * * Tomahawk is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,17 +33,8 @@ public: Tomahawk::GeneratorMode mode; QString type; - DynamicPlaylistRevision( const PlaylistRevision& other ) - { - revisionguid = other.revisionguid; - oldrevisionguid = other.oldrevisionguid; - newlist = other.newlist; - added = other.added; - removed = other.removed; - applied = other.applied; - } - - DynamicPlaylistRevision() {} + DynamicPlaylistRevision( const PlaylistRevision& other ); + DynamicPlaylistRevision(); }; } diff --git a/src/libtomahawk/playlist/dynamic/echonest/EchonestSteerer.cpp b/src/libtomahawk/playlist/dynamic/echonest/EchonestSteerer.cpp index 0192ece0a..d0c1e99b1 100644 --- a/src/libtomahawk/playlist/dynamic/echonest/EchonestSteerer.cpp +++ b/src/libtomahawk/playlist/dynamic/echonest/EchonestSteerer.cpp @@ -27,8 +27,8 @@ #include #include -#include -#include +#include "echonest/Playlist.h" +#include "dynamic/widgets/DynamicWidget.h" #include "utils/tomahawkutils.h" #include "utils/logger.h" diff --git a/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h b/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h index 26b0a43a6..841c8001c 100644 --- a/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h +++ b/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h @@ -43,7 +43,7 @@ namespace Tomahawk { class DynamicModel; - +class DynamicControl; class DynamicSetupWidget; class DynamicView; class CollapsibleControls; diff --git a/src/libtomahawk/playlist/trackview.cpp b/src/libtomahawk/playlist/trackview.cpp index 217a55b3f..e2ca177f4 100644 --- a/src/libtomahawk/playlist/trackview.cpp +++ b/src/libtomahawk/playlist/trackview.cpp @@ -34,6 +34,7 @@ #include "utils/logger.h" #include "dropjob.h" #include "artist.h" +#include "album.h" using namespace Tomahawk; diff --git a/src/libtomahawk/playlist/treemodel.cpp b/src/libtomahawk/playlist/treemodel.cpp index e1d898641..d3ebdc11f 100644 --- a/src/libtomahawk/playlist/treemodel.cpp +++ b/src/libtomahawk/playlist/treemodel.cpp @@ -73,6 +73,11 @@ TreeModel::clear() } } +Tomahawk::collection_ptr +TreeModel::collection() const +{ + return m_collection; +} void TreeModel::getCover( const QModelIndex& index ) diff --git a/src/libtomahawk/playlist/treemodel.h b/src/libtomahawk/playlist/treemodel.h index 30550ba47..af4aa6bf0 100644 --- a/src/libtomahawk/playlist/treemodel.h +++ b/src/libtomahawk/playlist/treemodel.h @@ -89,7 +89,7 @@ public: virtual QPersistentModelIndex currentItem() { return m_currentIndex; } - Tomahawk::collection_ptr collection() const { return m_collection; } + Tomahawk::collection_ptr collection() const; void addAllCollections(); void addCollection( const Tomahawk::collection_ptr& collection ); diff --git a/src/libtomahawk/playlistinterface.cpp b/src/libtomahawk/playlistinterface.cpp new file mode 100644 index 000000000..4a441ab4f --- /dev/null +++ b/src/libtomahawk/playlistinterface.cpp @@ -0,0 +1,45 @@ +/* === This file is part of Tomahawk Player - === + * + * Copyright 2011, Leo Franchi + * + * Tomahawk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Tomahawk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Tomahawk. If not, see . + */ + +#include "playlistinterface.h" + +#include "result.h" + +using namespace Tomahawk; + +PlaylistInterface::PlaylistInterface (QObject *parent ) + : m_object( parent ) +{ + qRegisterMetaType( "Tomahawk::PlaylistInterface::RepeatMode" ); +} + +PlaylistInterface::~PlaylistInterface() +{ +} + +result_ptr +PlaylistInterface::previousItem() +{ + return siblingItem( -1 ); +} + +result_ptr +PlaylistInterface::nextItem() +{ + return siblingItem( 1 ); +} diff --git a/src/libtomahawk/playlistinterface.h b/src/libtomahawk/playlistinterface.h index 65911a529..71d034caf 100644 --- a/src/libtomahawk/playlistinterface.h +++ b/src/libtomahawk/playlistinterface.h @@ -40,11 +40,8 @@ public: enum SkipRestrictions { NoSkipRestrictions, NoSkipForwards, NoSkipBackwards, NoSkip }; enum RetryMode { NoRetry, Retry }; - PlaylistInterface( QObject* parent = 0 ) : m_object( parent ) - { - qRegisterMetaType( "Tomahawk::PlaylistInterface::RepeatMode" ); - } - virtual ~PlaylistInterface() {} + explicit PlaylistInterface( QObject* parent = 0 ); + virtual ~PlaylistInterface(); virtual QList< Tomahawk::query_ptr > tracks() = 0; @@ -52,9 +49,9 @@ public: virtual int trackCount() const = 0; virtual Tomahawk::result_ptr currentItem() const = 0; - virtual Tomahawk::result_ptr previousItem() { return siblingItem( -1 ); } + virtual Tomahawk::result_ptr previousItem(); virtual bool hasNextItem() { return true; } - virtual Tomahawk::result_ptr nextItem() { return siblingItem( 1 ); } + virtual Tomahawk::result_ptr nextItem(); virtual Tomahawk::result_ptr siblingItem( int itemsAway ) = 0; virtual PlaylistInterface::RepeatMode repeatMode() const = 0; @@ -99,6 +96,8 @@ signals: virtual void nextTrackReady() = 0; private: + Q_DISABLE_COPY( PlaylistInterface ) + QObject* m_object; Tomahawk::playlistinterface_ptr m_sharedPtr; diff --git a/src/libtomahawk/query.cpp b/src/libtomahawk/query.cpp index 00234655e..9a40151be 100644 --- a/src/libtomahawk/query.cpp +++ b/src/libtomahawk/query.cpp @@ -432,6 +432,12 @@ Query::howSimilar( const Tomahawk::result_ptr& r ) } +QPair< Tomahawk::source_ptr, unsigned int > +Query::playedBy() const +{ + return m_playedBy; +} + int Query::levenshtein( const QString& source, const QString& target ) { diff --git a/src/libtomahawk/query.h b/src/libtomahawk/query.h index 91d6944f3..9f754cd74 100644 --- a/src/libtomahawk/query.h +++ b/src/libtomahawk/query.h @@ -77,7 +77,7 @@ public: bool resolvingFinished() const { return m_resolveFinished; } float howSimilar( const Tomahawk::result_ptr& r ); - QPair< Tomahawk::source_ptr, unsigned int > playedBy() const { return m_playedBy; } + QPair< Tomahawk::source_ptr, unsigned int > playedBy() const; Tomahawk::Resolver* currentResolver() const; QList< QWeakPointer< Tomahawk::Resolver > > resolvedBy() const { return m_resolvers; } @@ -126,6 +126,8 @@ private slots: void refreshResults(); private: + Query(); + void init(); void setCurrentResolver( Tomahawk::Resolver* resolver ); diff --git a/src/libtomahawk/result.h b/src/libtomahawk/result.h index 3b3a92654..11bfedded 100644 --- a/src/libtomahawk/result.h +++ b/src/libtomahawk/result.h @@ -123,6 +123,7 @@ private slots: private: // private constructor explicit Result( const QString& url ); + Result(); void updateAttributes(); void parseSocialActions(); diff --git a/src/libtomahawk/sip/SipPlugin.cpp b/src/libtomahawk/sip/SipPlugin.cpp index 9dfb6cfd5..a79557661 100644 --- a/src/libtomahawk/sip/SipPlugin.cpp +++ b/src/libtomahawk/sip/SipPlugin.cpp @@ -31,6 +31,8 @@ SipPluginFactory::generateId() return factoryId() + "_" + uniq; } +SipPlugin::SipPlugin() : QObject() {} +SipPlugin::~SipPlugin() {} SipPlugin::SipPlugin( const QString& pluginId, QObject* parent ) : QObject( parent ) diff --git a/src/libtomahawk/sip/SipPlugin.h b/src/libtomahawk/sip/SipPlugin.h index 54f6657c6..1830a9ea5 100644 --- a/src/libtomahawk/sip/SipPlugin.h +++ b/src/libtomahawk/sip/SipPlugin.h @@ -60,8 +60,9 @@ public: enum SipErrorCode { AuthError, ConnectionError }; // Placeholder for errors, to be defined enum ConnectionState { Disconnected, Connecting, Connected, Disconnecting }; + SipPlugin(); explicit SipPlugin( const QString& pluginId, QObject* parent = 0 ); - virtual ~SipPlugin() {} + virtual ~SipPlugin(); // plugin id is "pluginfactoryname_someuniqueid". get it from SipPluginFactory::generateId QString pluginId() const; diff --git a/src/libtomahawk/sourceplaylistinterface.cpp b/src/libtomahawk/sourceplaylistinterface.cpp index 2226bf309..87915af64 100644 --- a/src/libtomahawk/sourceplaylistinterface.cpp +++ b/src/libtomahawk/sourceplaylistinterface.cpp @@ -35,6 +35,8 @@ SourcePlaylistInterface::SourcePlaylistInterface( Tomahawk::source_ptr& source ) connect( source.data(), SIGNAL( playbackStarted( const Tomahawk::query_ptr& ) ), SLOT( onSourcePlaybackStarted( const Tomahawk::query_ptr& ) ) ); } +SourcePlaylistInterface::~SourcePlaylistInterface() +{} Tomahawk::result_ptr SourcePlaylistInterface::siblingItem( int itemsAway ) @@ -65,6 +67,11 @@ SourcePlaylistInterface::nextItem() return m_currentItem; } +result_ptr +SourcePlaylistInterface::currentItem() const +{ + return m_currentItem; +} bool SourcePlaylistInterface::hasNextItem() @@ -84,6 +91,13 @@ SourcePlaylistInterface::tracks() } +source_ptr +SourcePlaylistInterface::source() const +{ + return m_source; +} + + void SourcePlaylistInterface::reset() { @@ -110,4 +124,4 @@ SourcePlaylistInterface::resolvingFinished( bool hasResults ) tDebug( LOGEXTRA ) << Q_FUNC_INFO << " and has results? : " << (hasResults ? "true" : "false"); if ( hasResults ) emit nextTrackReady(); -} \ No newline at end of file +} diff --git a/src/libtomahawk/sourceplaylistinterface.h b/src/libtomahawk/sourceplaylistinterface.h index 9564bbd4a..6ff1822dd 100644 --- a/src/libtomahawk/sourceplaylistinterface.h +++ b/src/libtomahawk/sourceplaylistinterface.h @@ -36,6 +36,7 @@ Q_OBJECT public: SourcePlaylistInterface( Tomahawk::source_ptr& source ); + ~SourcePlaylistInterface(); QList tracks(); @@ -45,7 +46,7 @@ public: virtual Tomahawk::result_ptr siblingItem( int itemsAway ); virtual bool hasNextItem(); virtual Tomahawk::result_ptr nextItem(); - virtual Tomahawk::result_ptr currentItem() const { return m_currentItem; } + virtual Tomahawk::result_ptr currentItem() const; virtual PlaylistInterface::RepeatMode repeatMode() const { return PlaylistInterface::NoRepeat; } virtual PlaylistInterface::SeekRestrictions seekRestrictions() const { return PlaylistInterface::NoSeek; } @@ -56,7 +57,7 @@ public: virtual bool shuffled() const { return false; } virtual void setFilter( const QString& /*pattern*/ ) {} - virtual Tomahawk::source_ptr source() const { return m_source; } + virtual Tomahawk::source_ptr source() const; virtual void reset(); @@ -76,6 +77,8 @@ private slots: void resolvingFinished( bool hasResults ); private: + SourcePlaylistInterface(); + Tomahawk::source_ptr m_source; Tomahawk::result_ptr m_currentItem; bool m_gotNextItem; diff --git a/src/libtomahawk/typedefs.h b/src/libtomahawk/typedefs.h index 945381bc2..4ef47641b 100644 --- a/src/libtomahawk/typedefs.h +++ b/src/libtomahawk/typedefs.h @@ -22,7 +22,7 @@ #include #include -template class QSharedPointer; +//template class QSharedPointer; namespace Tomahawk { diff --git a/src/libtomahawk/utils/jspfloader.cpp b/src/libtomahawk/utils/jspfloader.cpp index 3f3583b60..f3dd6fac1 100644 --- a/src/libtomahawk/utils/jspfloader.cpp +++ b/src/libtomahawk/utils/jspfloader.cpp @@ -34,6 +34,22 @@ using namespace Tomahawk; +JSPFLoader::JSPFLoader( bool autoCreate, QObject *parent ) + : QObject( parent ) + , m_autoCreate( autoCreate ) +{} + +JSPFLoader::~JSPFLoader() +{ +} + +QList< Tomahawk::query_ptr > +JSPFLoader::entries() const +{ + return m_entries; +} + + void JSPFLoader::load( const QUrl& url ) { diff --git a/src/libtomahawk/utils/jspfloader.h b/src/libtomahawk/utils/jspfloader.h index 531a8d69d..0f103fd9c 100644 --- a/src/libtomahawk/utils/jspfloader.h +++ b/src/libtomahawk/utils/jspfloader.h @@ -38,14 +38,11 @@ class DLLEXPORT JSPFLoader : public QObject Q_OBJECT public: - explicit JSPFLoader( bool autoCreate = true, QObject* parent = 0 ) - : QObject( parent ) - , m_autoCreate( autoCreate ) - {} + explicit JSPFLoader( bool autoCreate = true, QObject* parent = 0 ); - virtual ~JSPFLoader() {} + virtual ~JSPFLoader(); - QList< Tomahawk::query_ptr > entries() const { return m_entries; } + QList< Tomahawk::query_ptr > entries() const; void setOverrideTitle( const QString& newTitle ) { m_overrideTitle = newTitle; } signals: diff --git a/src/libtomahawk/utils/spotifyparser.h b/src/libtomahawk/utils/spotifyparser.h index 0a7a7a511..24bba4fbf 100644 --- a/src/libtomahawk/utils/spotifyparser.h +++ b/src/libtomahawk/utils/spotifyparser.h @@ -21,6 +21,7 @@ #include "dllmacro.h" #include "typedefs.h" +#include "query.h" #include #include diff --git a/src/libtomahawk/utils/xspfloader.cpp b/src/libtomahawk/utils/xspfloader.cpp index ef750060b..54779c002 100644 --- a/src/libtomahawk/utils/xspfloader.cpp +++ b/src/libtomahawk/utils/xspfloader.cpp @@ -30,6 +30,15 @@ using namespace Tomahawk; +XSPFLoader::XSPFLoader( bool autoCreate, QObject *parent ) + : QObject( parent ) + , m_autoCreate( autoCreate ) + , m_NS("http://xspf.org/ns/0/") +{} + + +XSPFLoader::~XSPFLoader() +{} void XSPFLoader::setOverrideTitle( const QString& newTitle ) @@ -37,6 +46,11 @@ XSPFLoader::setOverrideTitle( const QString& newTitle ) m_overrideTitle = newTitle; } +QList< Tomahawk::query_ptr > +XSPFLoader::entries() const +{ + return m_entries; +} void XSPFLoader::load( const QUrl& url ) diff --git a/src/libtomahawk/utils/xspfloader.h b/src/libtomahawk/utils/xspfloader.h index 105b1b101..b496c4ba8 100644 --- a/src/libtomahawk/utils/xspfloader.h +++ b/src/libtomahawk/utils/xspfloader.h @@ -39,18 +39,10 @@ class DLLEXPORT XSPFLoader : public QObject Q_OBJECT public: - explicit XSPFLoader( bool autoCreate = true, QObject* parent = 0 ) - : QObject( parent ) - , m_autoCreate( autoCreate ) - , m_NS("http://xspf.org/ns/0/") - {} + explicit XSPFLoader( bool autoCreate = true, QObject* parent = 0 ); - virtual ~XSPFLoader() - { - qDebug() << Q_FUNC_INFO; - } - - QList< Tomahawk::query_ptr > entries() const { return m_entries; } + virtual ~XSPFLoader(); + QList< Tomahawk::query_ptr > entries() const; void setOverrideTitle( const QString& newTitle ); diff --git a/src/libtomahawk/widgets/SocialPlaylistWidget.h b/src/libtomahawk/widgets/SocialPlaylistWidget.h index d7fecee0d..50549c33c 100644 --- a/src/libtomahawk/widgets/SocialPlaylistWidget.h +++ b/src/libtomahawk/widgets/SocialPlaylistWidget.h @@ -32,9 +32,10 @@ #include #include "viewpage.h" - #include "dllmacro.h" #include "typedefs.h" +#include "album.h" +#include "query.h" class AlbumModel; class PlaylistModel; diff --git a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.h b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.h index c04ad14c6..55fc8dbd4 100644 --- a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.h +++ b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.h @@ -31,6 +31,7 @@ #include +#include "typedefs.h" #include "playlistinterface.h" #include "viewpage.h" #include "infosystem/infosystem.h" diff --git a/src/sip/zeroconf/zeroconf.cpp b/src/sip/zeroconf/zeroconf.cpp index 3e2bc1ab0..80c0ffccd 100644 --- a/src/sip/zeroconf/zeroconf.cpp +++ b/src/sip/zeroconf/zeroconf.cpp @@ -30,6 +30,8 @@ ZeroconfFactory::createPlugin( const QString& pluginId ) return new ZeroconfPlugin( pluginId.isEmpty() ? generateId() : pluginId ); } +ZeroconfPlugin::ZeroconfPlugin() : SipPlugin( "") {} + ZeroconfPlugin::ZeroconfPlugin ( const QString& pluginId ) : SipPlugin( pluginId ) , m_zeroconf( 0 ) @@ -39,6 +41,8 @@ ZeroconfPlugin::ZeroconfPlugin ( const QString& pluginId ) qDebug() << Q_FUNC_INFO; } +ZeroconfPlugin::~ZeroconfPlugin() {} + const QString ZeroconfPlugin::name() const { diff --git a/src/sip/zeroconf/zeroconf.h b/src/sip/zeroconf/zeroconf.h index c60e43698..5c1870ef6 100644 --- a/src/sip/zeroconf/zeroconf.h +++ b/src/sip/zeroconf/zeroconf.h @@ -48,18 +48,16 @@ class SIPDLLEXPORT ZeroconfPlugin : public SipPlugin Q_OBJECT public: + ZeroconfPlugin(); ZeroconfPlugin( const QString& pluginId ); - virtual ~ZeroconfPlugin() - { - qDebug() << Q_FUNC_INFO; - } + virtual ~ZeroconfPlugin(); virtual const QString name() const; virtual const QString friendlyName() const; virtual const QString accountName() const; virtual ConnectionState connectionState() const; - virtual bool isValid() const { return true; }; + virtual bool isValid() const { return true; } virtual QIcon icon() const; virtual void checkSettings() {} diff --git a/src/sourcetree/sourcesmodel.h b/src/sourcetree/sourcesmodel.h index d3f8d2f4b..234a299c3 100644 --- a/src/sourcetree/sourcesmodel.h +++ b/src/sourcetree/sourcesmodel.h @@ -23,6 +23,7 @@ #include #include "typedefs.h" +#include "source.h" class QMimeData;