|
|
@ -402,16 +402,16 @@ void TransferListWidget::hidePriorityColumn(bool hide) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void TransferListWidget::openSelectedTorrentsFolder() const { |
|
|
|
void TransferListWidget::openSelectedTorrentsFolder() const { |
|
|
|
QStringList pathsList; |
|
|
|
QSet<QString> pathsList; |
|
|
|
const QStringList hashes = getSelectedTorrentsHashes(); |
|
|
|
const QStringList hashes = getSelectedTorrentsHashes(); |
|
|
|
foreach (const QString &hash, hashes) { |
|
|
|
foreach (const QString &hash, hashes) { |
|
|
|
const QTorrentHandle h = BTSession->getTorrentHandle(hash); |
|
|
|
const QTorrentHandle h = BTSession->getTorrentHandle(hash); |
|
|
|
if (h.is_valid()) { |
|
|
|
if (h.is_valid()) { |
|
|
|
const QString savePath = h.save_path(); |
|
|
|
QString rootFolder = h.root_path(); |
|
|
|
qDebug("Opening path at %s", qPrintable(savePath)); |
|
|
|
qDebug("Opening path at %s", qPrintable(rootFolder)); |
|
|
|
if (!pathsList.contains(savePath)) { |
|
|
|
if (!pathsList.contains(rootFolder)) { |
|
|
|
pathsList.append(savePath); |
|
|
|
pathsList.insert(rootFolder); |
|
|
|
QDesktopServices::openUrl(QUrl::fromLocalFile(savePath)); |
|
|
|
QDesktopServices::openUrl(QUrl::fromLocalFile(rootFolder)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|