mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Code clean up
This commit is contained in:
@@ -131,10 +131,6 @@ TorrentModel* TransferListWidget::getSourceModel() const {
|
||||
return listModel;
|
||||
}
|
||||
|
||||
int TransferListWidget::getNbTorrents() const {
|
||||
return listModel->rowCount();
|
||||
}
|
||||
|
||||
void TransferListWidget::previewFile(QString filePath) {
|
||||
#ifdef Q_WS_WIN
|
||||
QDesktopServices::openUrl(QUrl(QString("file:///")+filePath));
|
||||
@@ -260,15 +256,6 @@ void TransferListWidget::startSelectedTorrents() {
|
||||
}
|
||||
}
|
||||
|
||||
void TransferListWidget::startAllTorrents() {
|
||||
for(int i=0; i<listModel->rowCount(); ++i) {
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(getHashFromRow(i));
|
||||
if(h.is_valid() && h.is_paused()) {
|
||||
h.resume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TransferListWidget::startVisibleTorrents() {
|
||||
QStringList hashes;
|
||||
for(int i=0; i<nameFilterModel->rowCount(); ++i) {
|
||||
@@ -293,15 +280,6 @@ void TransferListWidget::pauseSelectedTorrents() {
|
||||
}
|
||||
}
|
||||
|
||||
void TransferListWidget::pauseAllTorrents() {
|
||||
for(int i=0; i<listModel->rowCount(); ++i) {
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(getHashFromRow(i));
|
||||
if(h.is_valid() && !h.is_paused()) {
|
||||
h.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TransferListWidget::pauseVisibleTorrents() {
|
||||
QStringList hashes;
|
||||
for(int i=0; i<nameFilterModel->rowCount(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user