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