From 9da62199f2ee194537e606708e474da994adda8a Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 25 Mar 2015 10:15:07 +0100 Subject: [PATCH] Correct open in file manager for all states. --- src/libtomahawk/playlist/PlaylistItemDelegate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index 463a4d127..50fbd7d88 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -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() ) {