mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 13:58:51 +03:00
Fix Finder reveal in preview and torrent contents
This commit is contained in:
parent
d7fa5b6b6b
commit
ed154d35ba
2 changed files with 12 additions and 0 deletions
|
@ -65,6 +65,10 @@
|
|||
|
||||
#include "ui_propertieswidget.h"
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "macutilities.h"
|
||||
#endif
|
||||
|
||||
PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow *mainWindow, TransferListWidget *transferList)
|
||||
: QWidget(parent)
|
||||
, m_ui(new Ui::PropertiesWidget())
|
||||
|
@ -574,10 +578,14 @@ void PropertiesWidget::openFolder(const QModelIndex &index, bool containingFolde
|
|||
|
||||
// Flush data
|
||||
m_torrent->flushCache();
|
||||
#ifdef Q_OS_MAC
|
||||
MacUtils::openFiles(QSet<QString>{absolutePath});
|
||||
#else
|
||||
if (containingFolder)
|
||||
Utils::Misc::openFolderSelect(absolutePath);
|
||||
else
|
||||
Utils::Misc::openPath(absolutePath);
|
||||
#endif
|
||||
}
|
||||
|
||||
void PropertiesWidget::displayFilesListMenu(const QPoint &)
|
||||
|
|
|
@ -362,10 +362,14 @@ void TransferListWidget::torrentDoubleClicked()
|
|||
torrent->pause();
|
||||
break;
|
||||
case OPEN_DEST:
|
||||
#ifdef Q_OS_MAC
|
||||
MacUtils::openFiles(QSet<QString>{torrent->contentPath(true)});
|
||||
#else
|
||||
if (torrent->filesCount() == 1)
|
||||
Utils::Misc::openFolderSelect(torrent->contentPath(true));
|
||||
else
|
||||
Utils::Misc::openPath(torrent->contentPath(true));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue