diff --git a/src/libtomahawk/AlbumPlaylistInterface.h b/src/libtomahawk/AlbumPlaylistInterface.h index b1caf14ff..b2c9d471c 100644 --- a/src/libtomahawk/AlbumPlaylistInterface.h +++ b/src/libtomahawk/AlbumPlaylistInterface.h @@ -43,7 +43,6 @@ public: QList tracks(); virtual int trackCount() const { return m_queries.count(); } - virtual int unfilteredTrackCount() const { return m_queries.count(); } virtual Tomahawk::result_ptr siblingItem( int itemsAway ); diff --git a/src/libtomahawk/ArtistPlaylistInterface.h b/src/libtomahawk/ArtistPlaylistInterface.h index 920923512..655832d1f 100644 --- a/src/libtomahawk/ArtistPlaylistInterface.h +++ b/src/libtomahawk/ArtistPlaylistInterface.h @@ -42,7 +42,6 @@ public: virtual QList tracks(); virtual int trackCount() const { return m_queries.count(); } - virtual int unfilteredTrackCount() const { return m_queries.count(); } virtual Tomahawk::result_ptr siblingItem( int itemsAway ); diff --git a/src/libtomahawk/PlaylistInterface.h b/src/libtomahawk/PlaylistInterface.h index b0efdb923..e61b8c60c 100644 --- a/src/libtomahawk/PlaylistInterface.h +++ b/src/libtomahawk/PlaylistInterface.h @@ -42,7 +42,6 @@ public: virtual QList< Tomahawk::query_ptr > tracks() = 0; virtual bool isFinished() const { return m_finished; } - virtual int unfilteredTrackCount() const = 0; virtual int trackCount() const = 0; virtual Tomahawk::result_ptr currentItem() const = 0; @@ -78,10 +77,9 @@ public slots: virtual void setShuffled( bool enabled ) = 0; signals: + void trackCountChanged( unsigned int tracks ); void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode ); void shuffleModeChanged( bool enabled ); - void trackCountChanged( unsigned int tracks ); - void sourceTrackCountChanged( unsigned int tracks ); void latchModeChanged( Tomahawk::PlaylistModes::LatchMode mode ); void nextTrackReady(); diff --git a/src/libtomahawk/PlaylistPlaylistInterface.cpp b/src/libtomahawk/PlaylistPlaylistInterface.cpp index fa1954fcc..99ec12de9 100644 --- a/src/libtomahawk/PlaylistPlaylistInterface.cpp +++ b/src/libtomahawk/PlaylistPlaylistInterface.cpp @@ -40,13 +40,6 @@ PlaylistPlaylistInterface::~PlaylistPlaylistInterface() } -int -PlaylistPlaylistInterface::unfilteredTrackCount() const -{ - return ( m_playlist.isNull() ? 0 : m_playlist.data()->entries().count() ); -} - - int PlaylistPlaylistInterface::trackCount() const { diff --git a/src/libtomahawk/PlaylistPlaylistInterface.h b/src/libtomahawk/PlaylistPlaylistInterface.h index c234a951a..d2101d024 100644 --- a/src/libtomahawk/PlaylistPlaylistInterface.h +++ b/src/libtomahawk/PlaylistPlaylistInterface.h @@ -44,7 +44,6 @@ public: virtual QList tracks(); - virtual int unfilteredTrackCount() const; virtual int trackCount() const; virtual bool hasNextItem() { return false; } diff --git a/src/libtomahawk/SourcePlaylistInterface.h b/src/libtomahawk/SourcePlaylistInterface.h index ccfc45e1b..79311ef5f 100644 --- a/src/libtomahawk/SourcePlaylistInterface.h +++ b/src/libtomahawk/SourcePlaylistInterface.h @@ -42,7 +42,6 @@ public: QList tracks(); virtual int trackCount() const { return 1; } - virtual int unfilteredTrackCount() const { return 1; } virtual Tomahawk::result_ptr siblingItem( int itemsAway ); virtual bool sourceValid(); diff --git a/src/libtomahawk/ViewManager.cpp b/src/libtomahawk/ViewManager.cpp index e03bf2f8e..b83a1d5c2 100644 --- a/src/libtomahawk/ViewManager.cpp +++ b/src/libtomahawk/ViewManager.cpp @@ -189,8 +189,6 @@ ViewManager::show( const Tomahawk::playlist_ptr& playlist ) } setPage( view ); - emit numSourcesChanged( SourceList::instance()->count() ); - return view; } @@ -212,8 +210,6 @@ ViewManager::show( const Tomahawk::dynplaylist_ptr& playlist ) else showQueue();*/ - emit numSourcesChanged( SourceList::instance()->count() ); - return m_dynamicWidgets.value( playlist ).data(); } @@ -352,8 +348,6 @@ ViewManager::show( const Tomahawk::collection_ptr& collection ) setPage( aview ); } - emit numSourcesChanged( 1 ); - return shown; } @@ -422,8 +416,6 @@ ViewManager::showSuperCollection() setPage( m_superGridView ); } - emit numSourcesChanged( m_superCollections.count() ); - return shown; } @@ -723,17 +715,11 @@ ViewManager::unlinkPlaylist() { if ( currentPlaylistInterface() ) { - disconnect( currentPlaylistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ), - this, SIGNAL( numTracksChanged( unsigned int ) ) ); - - disconnect( currentPlaylistInterface().data(), SIGNAL( trackCountChanged( unsigned int ) ), - this, SIGNAL( numShownChanged( unsigned int ) ) ); - disconnect( currentPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ), - this, SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) ); + this, SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) ); disconnect( currentPlaylistInterface().data(), SIGNAL( shuffleModeChanged( bool ) ), - this, SIGNAL( shuffleModeChanged( bool ) ) ); + this, SIGNAL( shuffleModeChanged( bool ) ) ); } } @@ -766,12 +752,6 @@ ViewManager::updateView() { if ( currentPlaylistInterface() ) { - connect( currentPlaylistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ), - SIGNAL( numTracksChanged( unsigned int ) ) ); - - connect( currentPlaylistInterface().data(), SIGNAL( trackCountChanged( unsigned int ) ), - SIGNAL( numShownChanged( unsigned int ) ) ); - connect( currentPlaylistInterface().data(), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ), SIGNAL( repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode ) ) ); @@ -783,13 +763,6 @@ ViewManager::updateView() if ( currentPage()->showStatsBar() && currentPlaylistInterface() ) { - emit numTracksChanged( currentPlaylistInterface()->unfilteredTrackCount() ); - - if ( !currentPage()->filter().isEmpty() ) - emit numShownChanged( currentPlaylistInterface()->trackCount() ); - else - emit numShownChanged( currentPlaylistInterface()->unfilteredTrackCount() ); - emit repeatModeChanged( currentPlaylistInterface()->repeatMode() ); emit shuffleModeChanged( currentPlaylistInterface()->shuffled() ); emit modeChanged( currentPlaylistInterface()->viewMode() ); diff --git a/src/libtomahawk/ViewManager.h b/src/libtomahawk/ViewManager.h index 1f6e7f2b4..478b626f6 100644 --- a/src/libtomahawk/ViewManager.h +++ b/src/libtomahawk/ViewManager.h @@ -110,11 +110,6 @@ public: bool isTomahawkLoaded() const { return m_loaded; } signals: - void numSourcesChanged( unsigned int sources ); - void numTracksChanged( unsigned int tracks ); - void numArtistsChanged( unsigned int artists ); - void numShownChanged( unsigned int shown ); - void repeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode ); void shuffleModeChanged( bool enabled ); diff --git a/src/libtomahawk/playlist/PlayableProxyModel.cpp b/src/libtomahawk/playlist/PlayableProxyModel.cpp index 65a674c81..507f3120a 100644 --- a/src/libtomahawk/playlist/PlayableProxyModel.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModel.cpp @@ -75,9 +75,6 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel ) { if ( m_model ) { - if ( m_model->metaObject()->indexOfSignal( "trackCountChanged(uint)" ) > -1 ) - disconnect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), this, SIGNAL( sourceTrackCountChanged( unsigned int ) ) ); - disconnect( m_model, SIGNAL( loadingStarted() ), this, SIGNAL( loadingStarted() ) ); disconnect( m_model, SIGNAL( loadingFinished() ), this, SIGNAL( loadingFinished() ) ); } @@ -86,9 +83,6 @@ PlayableProxyModel::setSourcePlayableModel( PlayableModel* sourceModel ) if ( m_model ) { - if ( m_model->metaObject()->indexOfSignal( "trackCountChanged(uint)" ) > -1 ) - connect( m_model, SIGNAL( trackCountChanged( unsigned int ) ), playlistInterface().data(), SIGNAL( sourceTrackCountChanged( unsigned int ) ) ); - connect( m_model, SIGNAL( loadingStarted() ), SIGNAL( loadingStarted() ) ); connect( m_model, SIGNAL( loadingFinished() ), SIGNAL( loadingFinished() ) ); } diff --git a/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp b/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp index d47b88be0..58f29419c 100644 --- a/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp +++ b/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.cpp @@ -45,13 +45,6 @@ PlayableProxyModelPlaylistInterface::~PlayableProxyModelPlaylistInterface() } -int -PlayableProxyModelPlaylistInterface::unfilteredTrackCount() const -{ - return ( m_proxyModel.isNull() ? 0 : m_proxyModel.data()->sourceModel()->trackCount() ); -} - - int PlayableProxyModelPlaylistInterface::trackCount() const { diff --git a/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.h b/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.h index d26c1d1c3..34bb995a1 100644 --- a/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.h +++ b/src/libtomahawk/playlist/PlayableProxyModelPlaylistInterface.h @@ -41,7 +41,6 @@ public: virtual QList tracks(); - virtual int unfilteredTrackCount() const; virtual int trackCount() const; virtual Tomahawk::result_ptr currentItem() const; diff --git a/src/libtomahawk/playlist/TreeProxyModelPlaylistInterface.cpp b/src/libtomahawk/playlist/TreeProxyModelPlaylistInterface.cpp index 824589a55..ca8f5b234 100644 --- a/src/libtomahawk/playlist/TreeProxyModelPlaylistInterface.cpp +++ b/src/libtomahawk/playlist/TreeProxyModelPlaylistInterface.cpp @@ -56,16 +56,6 @@ TreeProxyModelPlaylistInterface::filter() const } -int -TreeProxyModelPlaylistInterface::unfilteredTrackCount() const -{ - if ( m_proxyModel.isNull() ) - return 0; - TreeProxyModel* proxyModel = m_proxyModel.data(); - return proxyModel->sourceModel()->rowCount( QModelIndex() ); -} - - int TreeProxyModelPlaylistInterface::trackCount() const { diff --git a/src/libtomahawk/playlist/TreeProxyModelPlaylistInterface.h b/src/libtomahawk/playlist/TreeProxyModelPlaylistInterface.h index 67137fe1a..4e0e47dc1 100644 --- a/src/libtomahawk/playlist/TreeProxyModelPlaylistInterface.h +++ b/src/libtomahawk/playlist/TreeProxyModelPlaylistInterface.h @@ -41,7 +41,6 @@ public: virtual QList< Tomahawk::query_ptr > tracks() { Q_ASSERT( FALSE ); QList< Tomahawk::query_ptr > queries; return queries; } - virtual int unfilteredTrackCount() const; virtual int trackCount() const; virtual bool hasNextItem(); diff --git a/src/libtomahawk/widgets/WhatsHotWidget_p.h b/src/libtomahawk/widgets/WhatsHotWidget_p.h index 8d830eb31..e75d4aa62 100644 --- a/src/libtomahawk/widgets/WhatsHotWidget_p.h +++ b/src/libtomahawk/widgets/WhatsHotWidget_p.h @@ -54,7 +54,6 @@ public: // Any one is fine, we keep them all synched virtual PlaylistModes::RepeatMode repeatMode() const { return m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->repeatMode(); } - virtual bool shuffled() const { return m_w->ui->tracksViewLeft->proxyModel()->playlistInterface()->shuffled(); } // Do nothing @@ -62,7 +61,6 @@ public: virtual Tomahawk::result_ptr siblingItem( int ) { return Tomahawk::result_ptr(); } virtual int trackCount() const { return 0; } virtual QList< Tomahawk::query_ptr > tracks() { return QList< Tomahawk::query_ptr >(); } - virtual int unfilteredTrackCount() const { return 0; } virtual bool hasChildInterface( Tomahawk::playlistinterface_ptr other ) {