1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

Correct open in file manager for all states.

This commit is contained in:
Christian Muehlhaeuser 2015-03-25 10:15:07 +01:00
parent 22e5d6ff64
commit 9da62199f2

View File

@ -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() )
{