From ef3fff210ef709456c292f1917fbf515b52c30ef Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 28 Nov 2012 08:02:03 +0100 Subject: [PATCH] * Forward TreeProxyModel::indexFromQuery to source-model. --- src/libtomahawk/playlist/TreeProxyModel.cpp | 7 +++++++ src/libtomahawk/playlist/TreeProxyModel.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/libtomahawk/playlist/TreeProxyModel.cpp b/src/libtomahawk/playlist/TreeProxyModel.cpp index a565d2bd9..ecbc1aa92 100644 --- a/src/libtomahawk/playlist/TreeProxyModel.cpp +++ b/src/libtomahawk/playlist/TreeProxyModel.cpp @@ -367,3 +367,10 @@ TreeProxyModel::indexFromResult( const Tomahawk::result_ptr& result ) const { return mapFromSource( m_model->indexFromResult( result ) ); } + + +QModelIndex +TreeProxyModel::indexFromQuery( const Tomahawk::query_ptr& query ) const +{ + return mapFromSource( m_model->indexFromQuery( query ) ); +} diff --git a/src/libtomahawk/playlist/TreeProxyModel.h b/src/libtomahawk/playlist/TreeProxyModel.h index 801dad821..be68f50d6 100644 --- a/src/libtomahawk/playlist/TreeProxyModel.h +++ b/src/libtomahawk/playlist/TreeProxyModel.h @@ -50,6 +50,7 @@ public: QModelIndex indexFromArtist( const Tomahawk::artist_ptr& artist ) const; QModelIndex indexFromAlbum( const Tomahawk::album_ptr& album ) const; QModelIndex indexFromResult( const Tomahawk::result_ptr& result ) const; + QModelIndex indexFromQuery( const Tomahawk::query_ptr& query ) const; protected: bool filterAcceptsRow( int sourceRow, const QModelIndex& sourceParent ) const;