diff --git a/src/libtomahawk/playlist/PlayableModel.cpp b/src/libtomahawk/playlist/PlayableModel.cpp index a1365e49b..670ad8813 100644 --- a/src/libtomahawk/playlist/PlayableModel.cpp +++ b/src/libtomahawk/playlist/PlayableModel.cpp @@ -294,6 +294,26 @@ PlayableModel::data( const QModelIndex& index, int role ) const if ( !entry ) return QVariant(); + if ( role == PlayableProxyModel::TypeRole ) + { + if ( entry->result() ) + { + return Tomahawk::TypeResult; + } + else if ( entry->query() ) + { + return Tomahawk::TypeQuery; + } + else if ( entry->artist() ) + { + return Tomahawk::TypeArtist; + } + else if ( entry->album() ) + { + return Tomahawk::TypeAlbum; + } + } + int column = index.column(); if ( role < CoverIDRole && role >= Qt::UserRole ) { @@ -310,33 +330,6 @@ PlayableModel::data( const QModelIndex& index, int role ) const break; } - case IsPlayingRole: - { - return entry->isPlaying(); - break; - } - - case PlayableProxyModel::TypeRole: - { - if ( entry->result() ) - { - return Tomahawk::TypeResult; - } - else if ( entry->query() ) - { - return Tomahawk::TypeQuery; - } - else if ( entry->artist() ) - { - return Tomahawk::TypeArtist; - } - else if ( entry->album() ) - { - return Tomahawk::TypeAlbum; - } - break; - } - default: { if ( !entry->query().isNull() )