Skip to content

Commit

Permalink
Correct open in file manager for all states.
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Mar 25, 2015
1 parent 22e5d6f commit 9da6219
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libtomahawk/playlist/PlaylistItemDelegate.cpp
Expand Up @@ -141,6 +141,10 @@ PlaylistItemDelegate::createEditor( QWidget* parent, const QStyleOptionViewItem&
{
QDesktopServices::openUrl( QUrl::fromLocalFile( QFileInfo( DownloadManager::instance()->localFileForDownload( item->result()->downloadFormats().first().url.toString() ) ).absolutePath() ) );
}
else if ( index.column() == PlayableModel::Download && item->result() && item->result()->downloadJob() && item->result()->downloadJob()->state() == DownloadJob::Finished )
{
QDesktopServices::openUrl( QUrl::fromLocalFile( QFileInfo( item->result()->downloadJob()->localFile() ).absolutePath() ) );
}
else if ( index.column() == PlayableModel::Download && item->result() &&
!item->result()->downloadFormats().isEmpty() && !item->result()->downloadJob() )
{
Expand Down

0 comments on commit 9da6219

Please sign in to comment.