|
|
@ -249,10 +249,7 @@ void TransferListWidget::setSelectedTorrentsLocation() { |
|
|
|
void TransferListWidget::startSelectedTorrents() { |
|
|
|
void TransferListWidget::startSelectedTorrents() { |
|
|
|
const QStringList hashes = getSelectedTorrentsHashes(); |
|
|
|
const QStringList hashes = getSelectedTorrentsHashes(); |
|
|
|
foreach(const QString &hash, hashes) { |
|
|
|
foreach(const QString &hash, hashes) { |
|
|
|
QTorrentHandle h = BTSession->getTorrentHandle(hash); |
|
|
|
BTSession->resumeTorrent(hash); |
|
|
|
if(h.is_valid() && h.is_paused()) { |
|
|
|
|
|
|
|
h.resume(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -263,20 +260,14 @@ void TransferListWidget::startVisibleTorrents() { |
|
|
|
hashes << getHashFromRow(row); |
|
|
|
hashes << getHashFromRow(row); |
|
|
|
} |
|
|
|
} |
|
|
|
foreach(const QString &hash, hashes) { |
|
|
|
foreach(const QString &hash, hashes) { |
|
|
|
QTorrentHandle h = BTSession->getTorrentHandle(hash); |
|
|
|
BTSession->resumeTorrent(hash); |
|
|
|
if(h.is_valid() && h.is_paused()) { |
|
|
|
|
|
|
|
h.resume(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void TransferListWidget::pauseSelectedTorrents() { |
|
|
|
void TransferListWidget::pauseSelectedTorrents() { |
|
|
|
const QStringList hashes = getSelectedTorrentsHashes(); |
|
|
|
const QStringList hashes = getSelectedTorrentsHashes(); |
|
|
|
foreach(const QString &hash, hashes) { |
|
|
|
foreach(const QString &hash, hashes) { |
|
|
|
QTorrentHandle h = BTSession->getTorrentHandle(hash); |
|
|
|
BTSession->pauseTorrent(hash); |
|
|
|
if(h.is_valid() && !h.is_paused()) { |
|
|
|
|
|
|
|
h.pause(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -287,10 +278,7 @@ void TransferListWidget::pauseVisibleTorrents() { |
|
|
|
hashes << getHashFromRow(row); |
|
|
|
hashes << getHashFromRow(row); |
|
|
|
} |
|
|
|
} |
|
|
|
foreach(const QString &hash, hashes) { |
|
|
|
foreach(const QString &hash, hashes) { |
|
|
|
QTorrentHandle h = BTSession->getTorrentHandle(hash); |
|
|
|
BTSession->pauseTorrent(hash); |
|
|
|
if(h.is_valid() && !h.is_paused()) { |
|
|
|
|
|
|
|
h.pause(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|