mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Merge pull request #485 from sledgehammer999/cp_mgn_uri
Enable 'copy magnet uri' for torrents without metadata too.
This commit is contained in:
commit
3b60c23178
1 changed files with 3 additions and 4 deletions
|
@ -391,8 +391,8 @@ void TransferListWidget::copySelectedMagnetURIs() const {
|
||||||
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() && h.has_metadata())
|
if (h.is_valid())
|
||||||
magnet_uris << misc::toQString(make_magnet_uri(h.get_torrent_info()));
|
magnet_uris << misc::toQString(make_magnet_uri(h));
|
||||||
}
|
}
|
||||||
qApp->clipboard()->setText(magnet_uris.join("\n"));
|
qApp->clipboard()->setText(magnet_uris.join("\n"));
|
||||||
}
|
}
|
||||||
|
@ -814,7 +814,6 @@ void TransferListWidget::displayListMenu(const QPoint&) {
|
||||||
prioMenu->addAction(&actionBottomPriority);
|
prioMenu->addAction(&actionBottomPriority);
|
||||||
}
|
}
|
||||||
listMenu.addSeparator();
|
listMenu.addSeparator();
|
||||||
if (one_has_metadata)
|
|
||||||
listMenu.addAction(&actionCopy_magnet_link);
|
listMenu.addAction(&actionCopy_magnet_link);
|
||||||
// Call menu
|
// Call menu
|
||||||
QAction *act = 0;
|
QAction *act = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue