diff --git a/src/libtomahawk/audio/audioengine.cpp b/src/libtomahawk/audio/audioengine.cpp index b77f474e3..2a4a8bfc7 100644 --- a/src/libtomahawk/audio/audioengine.cpp +++ b/src/libtomahawk/audio/audioengine.cpp @@ -469,7 +469,7 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result ) emit started( m_currentTrack ); if ( TomahawkSettings::instance()->verboseNotifications() ) - sendNowPlayingNotification(); + sendNowPlayingNotification(); if ( TomahawkSettings::instance()->privateListeningMode() != TomahawkSettings::FullyPrivate ) { diff --git a/src/libtomahawk/playlist/albumview.cpp b/src/libtomahawk/playlist/albumview.cpp index a83130457..9152503b7 100644 --- a/src/libtomahawk/playlist/albumview.cpp +++ b/src/libtomahawk/playlist/albumview.cpp @@ -116,7 +116,6 @@ AlbumView::setAlbumModel( AlbumModel* model ) connect( m_model, SIGNAL( loadingStarted() ), m_loadingSpinner, SLOT( fadeIn() ) ); connect( m_model, SIGNAL( loadingFinished() ), m_loadingSpinner, SLOT( fadeOut() ) ); - setAcceptDrops( false ); onViewChanged(); // Fetch covers if albums were added to model before model was attached to view } diff --git a/src/libtomahawk/playlist/artistview.cpp b/src/libtomahawk/playlist/artistview.cpp index 3c93e00a0..df24db5d0 100644 --- a/src/libtomahawk/playlist/artistview.cpp +++ b/src/libtomahawk/playlist/artistview.cpp @@ -138,7 +138,6 @@ ArtistView::setTreeModel( TreeModel* model ) connect( m_proxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), SLOT( onViewChanged() ) ); guid(); // this will set the guid on the header - setAcceptDrops( false ); if ( model->columnStyle() == TreeModel::TrackOnly ) { @@ -154,8 +153,10 @@ ArtistView::setTreeModel( TreeModel* model ) void -ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& /* previous */ ) +ArtistView::currentChanged( const QModelIndex& current, const QModelIndex& previous ) { + QTreeView::currentChanged( current, previous ); + if ( !m_updateContextView ) return; @@ -196,7 +197,6 @@ ArtistView::onItemActivated( const QModelIndex& index ) void ArtistView::keyPressEvent( QKeyEvent* event ) { - qDebug() << Q_FUNC_INFO; QTreeView::keyPressEvent( event ); if ( !model() ) @@ -209,13 +209,6 @@ ArtistView::keyPressEvent( QKeyEvent* event ) } -void -ArtistView::paintEvent( QPaintEvent* event ) -{ - QTreeView::paintEvent( event ); -} - - void ArtistView::resizeEvent( QResizeEvent* event ) { diff --git a/src/libtomahawk/playlist/artistview.h b/src/libtomahawk/playlist/artistview.h index 9e82571b4..623494c21 100644 --- a/src/libtomahawk/playlist/artistview.h +++ b/src/libtomahawk/playlist/artistview.h @@ -84,8 +84,7 @@ protected: virtual void startDrag( Qt::DropActions supportedActions ); virtual void resizeEvent( QResizeEvent* event ); - void paintEvent( QPaintEvent* event ); - void keyPressEvent( QKeyEvent* event ); + virtual void keyPressEvent( QKeyEvent* event ); protected slots: virtual void currentChanged( const QModelIndex& current, const QModelIndex& previous ); diff --git a/src/libtomahawk/playlist/collectionview.cpp b/src/libtomahawk/playlist/collectionview.cpp index ebb66f2be..cf038d3d5 100644 --- a/src/libtomahawk/playlist/collectionview.cpp +++ b/src/libtomahawk/playlist/collectionview.cpp @@ -35,7 +35,6 @@ CollectionView::CollectionView( QWidget* parent ) setProxyModel( new CollectionProxyModel( this ) ); setDragDropMode( QAbstractItemView::DragOnly ); - setAcceptDrops( false ); } diff --git a/src/libtomahawk/playlist/trackview.cpp b/src/libtomahawk/playlist/trackview.cpp index dc01fd980..840f8d131 100644 --- a/src/libtomahawk/playlist/trackview.cpp +++ b/src/libtomahawk/playlist/trackview.cpp @@ -156,8 +156,10 @@ TrackView::setTrackModel( TrackModel* model ) void -TrackView::currentChanged( const QModelIndex& current, const QModelIndex& /* previous */ ) +TrackView::currentChanged( const QModelIndex& current, const QModelIndex& previous ) { + QTreeView::currentChanged( current, previous ); + if ( !m_updateContextView ) return; diff --git a/src/libtomahawk/playlist/treemodel.cpp b/src/libtomahawk/playlist/treemodel.cpp index c55d797f8..cada2b10f 100644 --- a/src/libtomahawk/playlist/treemodel.cpp +++ b/src/libtomahawk/playlist/treemodel.cpp @@ -18,9 +18,7 @@ #include "treemodel.h" -#include #include -#include #include "source.h" #include "sourcelist.h" diff --git a/src/libtomahawk/viewmanager.cpp b/src/libtomahawk/viewmanager.cpp index f7ea016c8..2841f39a1 100644 --- a/src/libtomahawk/viewmanager.cpp +++ b/src/libtomahawk/viewmanager.cpp @@ -394,7 +394,8 @@ ViewManager::playlistInterfaceChanged( Tomahawk::PlaylistInterface* interface ) if ( !pl.isNull() ) { TomahawkSettings::instance()->appendRecentlyPlayedPlaylist( pl ); - } else + } + else { pl = dynamicPlaylistForInterface( interface ); if ( !pl.isNull() ) @@ -409,6 +410,7 @@ ViewManager::showWelcomePage() return show( m_welcomeWidget ); } + Tomahawk::ViewPage* ViewManager::showWhatsHotPage() {