From 00252e4e537c2938389139f448d7f166e7414525 Mon Sep 17 00:00:00 2001
From: Christian Muehlhaeuser <muesli@gmail.com>
Date: Thu, 16 Jun 2011 23:05:40 +0200
Subject: [PATCH] * This probably needs fixing some connects() now: Moved
 PlaylistInterface into Tomahawk namespace.

---
 src/audiocontrols.cpp                         |  8 ++++---
 src/audiocontrols.h                           |  4 ++--
 src/libtomahawk/audio/audioengine.cpp         |  4 +++-
 src/libtomahawk/audio/audioengine.h           | 23 +++++++++++--------
 src/libtomahawk/playlist/albummodel.h         |  4 ++--
 src/libtomahawk/playlist/albumproxymodel.h    | 12 +++++-----
 src/libtomahawk/playlist/albumview.h          |  4 ++--
 src/libtomahawk/playlist/artistview.h         |  2 +-
 .../playlist/collectionflatmodel.h            |  2 +-
 src/libtomahawk/playlist/collectionview.h     |  2 +-
 .../playlist/dynamic/widgets/DynamicWidget.h  |  1 -
 src/libtomahawk/playlist/playlistmodel.h      |  2 +-
 src/libtomahawk/playlist/playlistview.h       |  2 +-
 src/libtomahawk/playlist/topbar/topbar.h      |  2 +-
 src/libtomahawk/playlist/trackmodel.h         |  6 ++---
 src/libtomahawk/playlist/trackproxymodel.h    |  2 +-
 src/libtomahawk/playlist/trackview.h          |  1 -
 src/libtomahawk/playlist/treemodel.h          |  4 ++--
 src/libtomahawk/playlist/treeproxymodel.h     |  2 +-
 src/libtomahawk/playlistinterface.h           |  5 ++++
 src/libtomahawk/tomahawksettings.cpp          |  4 +++-
 src/libtomahawk/tomahawksettings.h            | 12 +++++-----
 src/libtomahawk/viewmanager.h                 | 20 ++++++++--------
 src/libtomahawk/viewpage.h                    |  2 +-
 .../widgets/infowidgets/sourceinfowidget.h    |  8 +++----
 src/libtomahawk/widgets/newplaylistwidget.h   |  2 +-
 src/libtomahawk/widgets/searchwidget.h        |  2 +-
 .../widgets/welcomeplaylistmodel.h            |  2 +-
 src/libtomahawk/widgets/welcomewidget.h       |  2 +-
 29 files changed, 79 insertions(+), 67 deletions(-)

diff --git a/src/audiocontrols.cpp b/src/audiocontrols.cpp
index 5247e38be..d8de7ee44 100644
--- a/src/audiocontrols.cpp
+++ b/src/audiocontrols.cpp
@@ -30,6 +30,8 @@
 
 #include "album.h"
 
+using namespace Tomahawk;
+
 static QString s_acInfoIdentifier = QString( "AUDIOCONTROLS" );
 
 
@@ -488,12 +490,12 @@ AudioControls::onLoveButtonClicked()
     trackInfo["title"] = m_currentTrack->track();
     trackInfo["artist"] = m_currentTrack->artist()->name();
     trackInfo["album"] = m_currentTrack->album()->name();
-    
+
     Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo(
        s_acInfoIdentifier, Tomahawk::InfoSystem::InfoLove,
        QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo ) );
-    
-    DatabaseCommand_SocialAction* cmd = new DatabaseCommand_SocialAction( m_currentTrack, QString( "Love" ) );                    
+
+    DatabaseCommand_SocialAction* cmd = new DatabaseCommand_SocialAction( m_currentTrack, QString( "Love" ) );
     Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
 }
 
diff --git a/src/audiocontrols.h b/src/audiocontrols.h
index 90c154c73..a74bd4925 100644
--- a/src/audiocontrols.h
+++ b/src/audiocontrols.h
@@ -43,7 +43,7 @@ signals:
     void pausePressed();
 
 public slots:
-    void onRepeatModeChanged( PlaylistInterface::RepeatMode mode );
+    void onRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
     void onShuffleModeChanged( bool enabled );
 
 protected:
@@ -81,7 +81,7 @@ private:
     QPixmap m_defaultCover;
 
     Tomahawk::result_ptr m_currentTrack;
-    PlaylistInterface::RepeatMode m_repeatMode;
+    Tomahawk::PlaylistInterface::RepeatMode m_repeatMode;
     bool m_shuffled;
 };
 
diff --git a/src/libtomahawk/audio/audioengine.cpp b/src/libtomahawk/audio/audioengine.cpp
index 2ae3c1bb9..2071c79f3 100644
--- a/src/libtomahawk/audio/audioengine.cpp
+++ b/src/libtomahawk/audio/audioengine.cpp
@@ -29,6 +29,8 @@
 
 #include "album.h"
 
+using namespace Tomahawk;
+
 AudioEngine* AudioEngine::s_instance = 0;
 
 static QString s_aeInfoIdentifier = QString( "AUDIOENGINE" );
@@ -319,7 +321,7 @@ AudioEngine::loadNextTrack()
 
 
 void
-AudioEngine::playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr& result )
+AudioEngine::playItem( Tomahawk::PlaylistInterface* playlist, const Tomahawk::result_ptr& result )
 {
     qDebug() << Q_FUNC_INFO;
 
diff --git a/src/libtomahawk/audio/audioengine.h b/src/libtomahawk/audio/audioengine.h
index d423c7321..d401e7b03 100644
--- a/src/libtomahawk/audio/audioengine.h
+++ b/src/libtomahawk/audio/audioengine.h
@@ -31,7 +31,10 @@
 
 #define AUDIO_VOLUME_STEP 5
 
-class PlaylistInterface;
+namespace Tomahawk
+{
+    class PlaylistInterface;
+}
 
 class DLLEXPORT AudioEngine : public QObject
 {
@@ -50,10 +53,10 @@ public:
     bool isPaused() const { return m_mediaObject->state() == Phonon::PausedState; }
 
     /* Returns the PlaylistInterface of the currently playing track. Note: This might be different to the current playlist! */
-    PlaylistInterface* currentTrackPlaylist() const { return m_currentTrackPlaylist; }
+    Tomahawk::PlaylistInterface* currentTrackPlaylist() const { return m_currentTrackPlaylist; }
 
     /* Returns the PlaylistInterface of the current playlist. Note: The currently playing track might still be from a different playlist! */
-    PlaylistInterface* playlist() const { return m_playlist; }
+    Tomahawk::PlaylistInterface* playlist() const { return m_playlist; }
 
 public slots:
     void playPause();
@@ -71,9 +74,9 @@ public slots:
     void onVolumeChanged( qreal volume ) { emit volumeChanged( volume * 100 ); }
     void mute();
 
-    void playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr& result );
-    void setPlaylist( PlaylistInterface* playlist );
-    void setQueue( PlaylistInterface* queue ) { m_queue = queue; }
+    void playItem( Tomahawk::PlaylistInterface* playlist, const Tomahawk::result_ptr& result );
+    void setPlaylist( Tomahawk::PlaylistInterface* playlist );
+    void setQueue( Tomahawk::PlaylistInterface* queue ) { m_queue = queue; }
 
     void onTrackAboutToFinish();
 
@@ -91,7 +94,7 @@ signals:
     void timerSeconds( unsigned int secondsElapsed );
     void timerPercentage( unsigned int percentage );
 
-    void playlistChanged( PlaylistInterface* playlist );
+    void playlistChanged( Tomahawk::PlaylistInterface* playlist );
 
     void error( AudioErrorCode errorCode );
 
@@ -115,9 +118,9 @@ private:
 
     Tomahawk::result_ptr m_currentTrack;
     Tomahawk::result_ptr m_lastTrack;
-    PlaylistInterface* m_playlist;
-    PlaylistInterface* m_currentTrackPlaylist;
-    PlaylistInterface* m_queue;
+    Tomahawk::PlaylistInterface* m_playlist;
+    Tomahawk::PlaylistInterface* m_currentTrackPlaylist;
+    Tomahawk::PlaylistInterface* m_queue;
 
     Phonon::MediaObject* m_mediaObject;
     Phonon::AudioOutput* m_audioOutput;
diff --git a/src/libtomahawk/playlist/albummodel.h b/src/libtomahawk/playlist/albummodel.h
index ae8658e19..0b8b1afd4 100644
--- a/src/libtomahawk/playlist/albummodel.h
+++ b/src/libtomahawk/playlist/albummodel.h
@@ -81,11 +81,11 @@ public:
     }
 
 public slots:
-    virtual void setRepeatMode( PlaylistInterface::RepeatMode /*mode*/ ) {}
+    virtual void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode /*mode*/ ) {}
     virtual void setShuffled( bool /*shuffled*/ ) {}
 
 signals:
-    void repeatModeChanged( PlaylistInterface::RepeatMode mode );
+    void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
     void shuffleModeChanged( bool enabled );
 
     void trackCountChanged( unsigned int tracks );
diff --git a/src/libtomahawk/playlist/albumproxymodel.h b/src/libtomahawk/playlist/albumproxymodel.h
index 7427cc85f..17c4e3c1c 100644
--- a/src/libtomahawk/playlist/albumproxymodel.h
+++ b/src/libtomahawk/playlist/albumproxymodel.h
@@ -1,5 +1,5 @@
 /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
- * 
+ *
  *   Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
  *
  *   Tomahawk is free software: you can redistribute it and/or modify
@@ -26,7 +26,7 @@
 
 #include "dllmacro.h"
 
-class DLLEXPORT AlbumProxyModel : public QSortFilterProxyModel, public PlaylistInterface
+class DLLEXPORT AlbumProxyModel : public QSortFilterProxyModel, public Tomahawk::PlaylistInterface
 {
 Q_OBJECT
 
@@ -38,7 +38,7 @@ public:
     virtual void setSourceModel( QAbstractItemModel* sourceModel );
 
     virtual QList<Tomahawk::query_ptr> tracks() { Q_ASSERT( FALSE ); QList<Tomahawk::query_ptr> queries; return queries; }
-    
+
     virtual int unfilteredTrackCount() const { return sourceModel()->rowCount( QModelIndex() ); }
     virtual int trackCount() const { return rowCount( QModelIndex() ); }
     virtual int albumCount() const { return rowCount( QModelIndex() ); }
@@ -50,10 +50,10 @@ public:
 
     virtual void setFilter( const QString& pattern );
 
-    virtual PlaylistInterface::RepeatMode repeatMode() const { return m_repeatMode; }
+    virtual Tomahawk::PlaylistInterface::RepeatMode repeatMode() const { return m_repeatMode; }
     virtual bool shuffled() const { return m_shuffled; }
-    virtual PlaylistInterface::ViewMode viewMode() const { return PlaylistInterface::Album; }
-    
+    virtual Tomahawk::PlaylistInterface::ViewMode viewMode() const { return Tomahawk::PlaylistInterface::Album; }
+
 signals:
     void repeatModeChanged( PlaylistInterface::RepeatMode mode );
     void shuffleModeChanged( bool enabled );
diff --git a/src/libtomahawk/playlist/albumview.h b/src/libtomahawk/playlist/albumview.h
index 194eab8d7..263b4572f 100644
--- a/src/libtomahawk/playlist/albumview.h
+++ b/src/libtomahawk/playlist/albumview.h
@@ -1,5 +1,5 @@
 /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
- * 
+ *
  *   Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
  *
  *   Tomahawk is free software: you can redistribute it and/or modify
@@ -46,7 +46,7 @@ public:
     void setModel( QAbstractItemModel* model );
 
     virtual QWidget* widget() { return this; }
-    virtual PlaylistInterface* playlistInterface() const { return proxyModel(); }
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }
 
     virtual QString title() const { return m_model->title(); }
     virtual QString description() const { return m_model->description(); }
diff --git a/src/libtomahawk/playlist/artistview.h b/src/libtomahawk/playlist/artistview.h
index e7eaf9a96..119237246 100644
--- a/src/libtomahawk/playlist/artistview.h
+++ b/src/libtomahawk/playlist/artistview.h
@@ -48,7 +48,7 @@ public:
     void setModel( TreeModel* model );
 
     virtual QWidget* widget() { return this; }
-    virtual PlaylistInterface* playlistInterface() const { return proxyModel(); }
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }
 
     virtual QString title() const { return m_model->title(); }
     virtual QString description() const { return m_model->description(); }
diff --git a/src/libtomahawk/playlist/collectionflatmodel.h b/src/libtomahawk/playlist/collectionflatmodel.h
index 816be924d..fbf489975 100644
--- a/src/libtomahawk/playlist/collectionflatmodel.h
+++ b/src/libtomahawk/playlist/collectionflatmodel.h
@@ -57,7 +57,7 @@ public:
     virtual void append( const Tomahawk::query_ptr& /*query*/ ) {}
 
 signals:
-    void repeatModeChanged( PlaylistInterface::RepeatMode mode );
+    void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
     void shuffleModeChanged( bool enabled );
 
     void loadingStarted();
diff --git a/src/libtomahawk/playlist/collectionview.h b/src/libtomahawk/playlist/collectionview.h
index a9aad7b17..e19c80d28 100644
--- a/src/libtomahawk/playlist/collectionview.h
+++ b/src/libtomahawk/playlist/collectionview.h
@@ -40,7 +40,7 @@ public:
     virtual void setModel( QAbstractItemModel* model );
 
     virtual QWidget* widget() { return this; }
-    virtual PlaylistInterface* playlistInterface() const { return proxyModel(); }
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }
 
     virtual QString title() const { return model()->title(); }
     virtual QString description() const { return model()->description(); }
diff --git a/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h b/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h
index 07a7b65b0..b9043ebbf 100644
--- a/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h
+++ b/src/libtomahawk/playlist/dynamic/widgets/DynamicWidget.h
@@ -36,7 +36,6 @@ class QVBoxLayout;
 class QHBoxLayout;
 class QPushButton;
 class QComboBox;
-class PlaylistInterface;
 class PlaylistModel;
 class PlaylistView;
 class AnimatedSplitter;
diff --git a/src/libtomahawk/playlist/playlistmodel.h b/src/libtomahawk/playlist/playlistmodel.h
index 30af9f4ea..4ca461fd3 100644
--- a/src/libtomahawk/playlist/playlistmodel.h
+++ b/src/libtomahawk/playlist/playlistmodel.h
@@ -69,7 +69,7 @@ public:
 
     bool isTemporary() const;
 signals:
-    void repeatModeChanged( PlaylistInterface::RepeatMode mode );
+    void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
     void shuffleModeChanged( bool enabled );
 
     void itemSizeChanged( const QModelIndex& index );
diff --git a/src/libtomahawk/playlist/playlistview.h b/src/libtomahawk/playlist/playlistview.h
index 12bbd934b..4bc19650a 100644
--- a/src/libtomahawk/playlist/playlistview.h
+++ b/src/libtomahawk/playlist/playlistview.h
@@ -43,7 +43,7 @@ public:
     virtual void setModel( QAbstractItemModel* model );
 
     virtual QWidget* widget() { return this; }
-    virtual PlaylistInterface* playlistInterface() const { return proxyModel(); }
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const { return proxyModel(); }
 
     virtual bool showFilter() const { return true; }
 
diff --git a/src/libtomahawk/playlist/topbar/topbar.h b/src/libtomahawk/playlist/topbar/topbar.h
index 652e0cc19..3fe9b0a98 100644
--- a/src/libtomahawk/playlist/topbar/topbar.h
+++ b/src/libtomahawk/playlist/topbar/topbar.h
@@ -63,7 +63,7 @@ public slots:
     void setFilter( const QString& filter );
 
 private slots:
-    void onModeChanged( PlaylistInterface::ViewMode mode );
+    void onModeChanged( Tomahawk::PlaylistInterface::ViewMode mode );
     void onFlatMode();
     void onArtistMode();
     void onAlbumMode();
diff --git a/src/libtomahawk/playlist/trackmodel.h b/src/libtomahawk/playlist/trackmodel.h
index 5a935c8df..c1883f280 100644
--- a/src/libtomahawk/playlist/trackmodel.h
+++ b/src/libtomahawk/playlist/trackmodel.h
@@ -74,7 +74,7 @@ public:
 
     virtual QPersistentModelIndex currentItem() { return m_currentIndex; }
 
-    virtual PlaylistInterface::RepeatMode repeatMode() const { return PlaylistInterface::NoRepeat; }
+virtual Tomahawk::PlaylistInterface::RepeatMode repeatMode() const { return Tomahawk::PlaylistInterface::NoRepeat; }
     virtual bool shuffled() const { return false; }
 
     virtual void ensureResolved();
@@ -86,7 +86,7 @@ public:
     TrackModelItem* m_rootItem;
 
 signals:
-    void repeatModeChanged( PlaylistInterface::RepeatMode mode );
+    void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
     void shuffleModeChanged( bool enabled );
 
     void trackCountChanged( unsigned int tracks );
@@ -100,7 +100,7 @@ public slots:
     virtual void removeIndex( const QModelIndex& index, bool moreToCome = false );
     virtual void removeIndexes( const QList<QModelIndex>& indexes );
 
-    virtual void setRepeatMode( PlaylistInterface::RepeatMode /*mode*/ ) {}
+    virtual void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode /*mode*/ ) {}
     virtual void setShuffled( bool /*shuffled*/ ) {}
 
 protected:
diff --git a/src/libtomahawk/playlist/trackproxymodel.h b/src/libtomahawk/playlist/trackproxymodel.h
index ee8b65753..648a63012 100644
--- a/src/libtomahawk/playlist/trackproxymodel.h
+++ b/src/libtomahawk/playlist/trackproxymodel.h
@@ -26,7 +26,7 @@
 
 #include "dllmacro.h"
 
-class DLLEXPORT TrackProxyModel : public QSortFilterProxyModel, public PlaylistInterface
+class DLLEXPORT TrackProxyModel : public QSortFilterProxyModel, public Tomahawk::PlaylistInterface
 {
 Q_OBJECT
 
diff --git a/src/libtomahawk/playlist/trackview.h b/src/libtomahawk/playlist/trackview.h
index 5d808bf31..65566f12a 100644
--- a/src/libtomahawk/playlist/trackview.h
+++ b/src/libtomahawk/playlist/trackview.h
@@ -28,7 +28,6 @@
 
 class QAction;
 class LoadingSpinner;
-class PlaylistInterface;
 class TrackHeader;
 class TrackModel;
 class TrackProxyModel;
diff --git a/src/libtomahawk/playlist/treemodel.h b/src/libtomahawk/playlist/treemodel.h
index 4841ceee0..5e9379406 100644
--- a/src/libtomahawk/playlist/treemodel.h
+++ b/src/libtomahawk/playlist/treemodel.h
@@ -101,11 +101,11 @@ public:
 public slots:
     virtual void setCurrentItem( const QModelIndex& index );
 
-    virtual void setRepeatMode( PlaylistInterface::RepeatMode /*mode*/ ) {}
+    virtual void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode /*mode*/ ) {}
     virtual void setShuffled( bool /*shuffled*/ ) {}
 
 signals:
-    void repeatModeChanged( PlaylistInterface::RepeatMode mode );
+    void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
     void shuffleModeChanged( bool enabled );
 
     void trackCountChanged( unsigned int tracks );
diff --git a/src/libtomahawk/playlist/treeproxymodel.h b/src/libtomahawk/playlist/treeproxymodel.h
index 34444dc6e..fb1f0dbf2 100644
--- a/src/libtomahawk/playlist/treeproxymodel.h
+++ b/src/libtomahawk/playlist/treeproxymodel.h
@@ -26,7 +26,7 @@
 
 #include "dllmacro.h"
 
-class DLLEXPORT TreeProxyModel : public QSortFilterProxyModel, public PlaylistInterface
+class DLLEXPORT TreeProxyModel : public QSortFilterProxyModel, public Tomahawk::PlaylistInterface
 {
 Q_OBJECT
 
diff --git a/src/libtomahawk/playlistinterface.h b/src/libtomahawk/playlistinterface.h
index bbb0e2e5c..1c71735e6 100644
--- a/src/libtomahawk/playlistinterface.h
+++ b/src/libtomahawk/playlistinterface.h
@@ -27,6 +27,9 @@
 #include "dllmacro.h"
 #include "result.h"
 
+namespace Tomahawk
+{
+
 class DLLEXPORT PlaylistInterface
 {
 public:
@@ -70,4 +73,6 @@ private:
     QString m_filter;
 };
 
+};
+
 #endif // PLAYLISTINTERFACE_H
diff --git a/src/libtomahawk/tomahawksettings.cpp b/src/libtomahawk/tomahawksettings.cpp
index cbbed1c9b..3023d192d 100644
--- a/src/libtomahawk/tomahawksettings.cpp
+++ b/src/libtomahawk/tomahawksettings.cpp
@@ -30,6 +30,8 @@
 
 #define VERSION 3
 
+using namespace Tomahawk;
+
 TomahawkSettings* TomahawkSettings::s_instance = 0;
 
 
@@ -199,7 +201,7 @@ TomahawkSettings::scannerMode() const
     return (TomahawkSettings::ScannerMode) value( "scanner/mode", TomahawkSettings::Files ).toInt();
 }
 
- 
+
 void
 TomahawkSettings::setScannerMode( ScannerMode mode )
 {
diff --git a/src/libtomahawk/tomahawksettings.h b/src/libtomahawk/tomahawksettings.h
index e78f86c82..aaedcbb08 100644
--- a/src/libtomahawk/tomahawksettings.h
+++ b/src/libtomahawk/tomahawksettings.h
@@ -49,7 +49,7 @@ public:
     void setScannerMode( ScannerMode mode );
     uint scannerTime() const;
     void setScannerTime( uint time );
-    
+
     bool watchForChanges() const;
     void setWatchForChanges( bool watch );
 
@@ -73,11 +73,11 @@ public:
     QList<Tomahawk::playlist_ptr> recentlyPlayedPlaylists() const;
     QStringList recentlyPlayedPlaylistGuids( unsigned int amount = 0 ) const;
     void appendRecentlyPlayedPlaylist( const Tomahawk::playlist_ptr& playlist );
-    
+
     bool shuffleState( const QString& playlistid ) const;
     void setShuffleState( const QString& playlistid, bool state );
-    PlaylistInterface::RepeatMode repeatMode( const QString& playlistid );
-    void setRepeatMode( const QString& playlistid, PlaylistInterface::RepeatMode mode);
+    Tomahawk::PlaylistInterface::RepeatMode repeatMode( const QString& playlistid );
+    void setRepeatMode( const QString& playlistid, Tomahawk::PlaylistInterface::RepeatMode mode );
 
     // remove shuffle state and repeat state
     void removePlaylistSettings( const QString& playlistid );
@@ -119,10 +119,10 @@ public:
 
     QString proxyHost() const;
     void setProxyHost( const QString &host );
-    
+
     QString proxyNoProxyHosts() const;
     void setProxyNoProxyHosts( const QString &hosts );
-    
+
     qulonglong proxyPort() const;
     void setProxyPort( const qulonglong port );
 
diff --git a/src/libtomahawk/viewmanager.h b/src/libtomahawk/viewmanager.h
index 0dbd21e15..20919534b 100644
--- a/src/libtomahawk/viewmanager.h
+++ b/src/libtomahawk/viewmanager.h
@@ -72,9 +72,9 @@ public:
     bool isSuperCollectionVisible() const;
     bool isNewPlaylistPageVisible() const;
 
-    PlaylistInterface* currentPlaylistInterface() const;
+    Tomahawk::PlaylistInterface* currentPlaylistInterface() const;
     Tomahawk::ViewPage* currentPage() const;
-    Tomahawk::ViewPage* pageForInterface( PlaylistInterface* interface ) const;
+    Tomahawk::ViewPage* pageForInterface( Tomahawk::PlaylistInterface* interface ) const;
     int positionInHistory( Tomahawk::ViewPage* page ) const;
 
     Tomahawk::ViewPage* show( Tomahawk::ViewPage* page );
@@ -97,13 +97,13 @@ signals:
     void numArtistsChanged( unsigned int artists );
     void numShownChanged( unsigned int shown );
 
-    void repeatModeChanged( PlaylistInterface::RepeatMode mode );
+    void repeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
     void shuffleModeChanged( bool enabled );
 
     void statsAvailable( bool b );
     void modesAvailable( bool b );
     void filterAvailable( bool b );
-    void modeChanged( PlaylistInterface::ViewMode mode );
+    void modeChanged( Tomahawk::PlaylistInterface::ViewMode mode );
 
     void playClicked();
     void pauseClicked();
@@ -138,10 +138,10 @@ public slots:
     void showQueue();
     void hideQueue();
 
-    void setRepeatMode( PlaylistInterface::RepeatMode mode );
+    void setRepeatMode( Tomahawk::PlaylistInterface::RepeatMode mode );
     void setShuffled( bool enabled );
 
-    void playlistInterfaceChanged( PlaylistInterface* );
+    void playlistInterfaceChanged( Tomahawk::PlaylistInterface* );
 
     // called by the playlist creation dbcmds
     void createPlaylist( const Tomahawk::source_ptr& src, const QVariant& contents );
@@ -164,10 +164,10 @@ private:
     void unlinkPlaylist();
     void saveCurrentPlaylistSettings();
     void loadCurrentPlaylistSettings();
-    
-    Tomahawk::playlist_ptr playlistForInterface( PlaylistInterface* interface ) const;
-    Tomahawk::dynplaylist_ptr dynamicPlaylistForInterface( PlaylistInterface* interface ) const;
-    Tomahawk::collection_ptr collectionForInterface( PlaylistInterface* interface ) const;
+
+    Tomahawk::playlist_ptr playlistForInterface( Tomahawk::PlaylistInterface* interface ) const;
+    Tomahawk::dynplaylist_ptr dynamicPlaylistForInterface( Tomahawk::PlaylistInterface* interface ) const;
+    Tomahawk::collection_ptr collectionForInterface( Tomahawk::PlaylistInterface* interface ) const;
 
     QWidget* m_widget;
     InfoBar* m_infobar;
diff --git a/src/libtomahawk/viewpage.h b/src/libtomahawk/viewpage.h
index 31e18ba3e..e17acf2b3 100644
--- a/src/libtomahawk/viewpage.h
+++ b/src/libtomahawk/viewpage.h
@@ -38,7 +38,7 @@ public:
     virtual ~ViewPage() {}
 
     virtual QWidget* widget() = 0;
-    virtual PlaylistInterface* playlistInterface() const = 0;
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const = 0;
 
     virtual QString title() const = 0;
     virtual QString description() const = 0;
diff --git a/src/libtomahawk/widgets/infowidgets/sourceinfowidget.h b/src/libtomahawk/widgets/infowidgets/sourceinfowidget.h
index 12528129e..a72571af3 100644
--- a/src/libtomahawk/widgets/infowidgets/sourceinfowidget.h
+++ b/src/libtomahawk/widgets/infowidgets/sourceinfowidget.h
@@ -1,5 +1,5 @@
 /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
- * 
+ *
  *   Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
  *
  *   Tomahawk is free software: you can redistribute it and/or modify
@@ -46,15 +46,15 @@ public:
     ~SourceInfoWidget();
 
     virtual QWidget* widget() { return this; }
-    virtual PlaylistInterface* playlistInterface() const { return 0; }
-    
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
+
     virtual QString title() const { return m_title; }
     virtual QString description() const { return m_description; }
 
     virtual bool showStatsBar() const { return false; }
 
     virtual bool jumpToCurrentTrack() { return false; }
-    
+
 protected:
     void changeEvent( QEvent* e );
 
diff --git a/src/libtomahawk/widgets/newplaylistwidget.h b/src/libtomahawk/widgets/newplaylistwidget.h
index 21a18ec91..d992e5a8a 100644
--- a/src/libtomahawk/widgets/newplaylistwidget.h
+++ b/src/libtomahawk/widgets/newplaylistwidget.h
@@ -46,7 +46,7 @@ public:
     ~NewPlaylistWidget();
 
     virtual QWidget* widget() { return this; }
-    virtual PlaylistInterface* playlistInterface() const { return 0; }
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
 
     virtual QString title() const { return tr( "Create a new playlist" ); }
     virtual QString description() const { return QString(); }
diff --git a/src/libtomahawk/widgets/searchwidget.h b/src/libtomahawk/widgets/searchwidget.h
index 2fbea9808..e8bbd08aa 100644
--- a/src/libtomahawk/widgets/searchwidget.h
+++ b/src/libtomahawk/widgets/searchwidget.h
@@ -45,7 +45,7 @@ public:
     ~SearchWidget();
 
     virtual QWidget* widget() { return this; }
-    virtual PlaylistInterface* playlistInterface() const { return 0; }
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
 
     virtual QString title() const { return tr( "Search" ); }
     virtual QString description() const { return tr( "Results for '%1'" ).arg( m_search ); }
diff --git a/src/libtomahawk/widgets/welcomeplaylistmodel.h b/src/libtomahawk/widgets/welcomeplaylistmodel.h
index 531cf2894..b4defabed 100644
--- a/src/libtomahawk/widgets/welcomeplaylistmodel.h
+++ b/src/libtomahawk/widgets/welcomeplaylistmodel.h
@@ -44,7 +44,7 @@ signals:
     void emptinessChanged( bool isEmpty );
 
 private slots:
-    void playlistChanged( PlaylistInterface* );
+    void playlistChanged( Tomahawk::PlaylistInterface* );
     void onSourceAdded( const Tomahawk::source_ptr& source );
     void onPlaylistsRemoved( QList<Tomahawk::playlist_ptr> );
     void loadFromSettings();
diff --git a/src/libtomahawk/widgets/welcomewidget.h b/src/libtomahawk/widgets/welcomewidget.h
index c8695ccd0..762fbe366 100644
--- a/src/libtomahawk/widgets/welcomewidget.h
+++ b/src/libtomahawk/widgets/welcomewidget.h
@@ -80,7 +80,7 @@ public:
     ~WelcomeWidget();
 
     virtual QWidget* widget() { return this; }
-    virtual PlaylistInterface* playlistInterface() const { return 0; }
+    virtual Tomahawk::PlaylistInterface* playlistInterface() const { return 0; }
 
     virtual QString title() const { return tr( "Welcome to Tomahawk" ); }
     virtual QString description() const { return QString(); }