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;