mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
BUGFIX: Correctly update total number of torrents when a torrent is automatically removed (closes #668726)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
- BUGFIX: Fix crash when pressing enter in save path field in torrent addition dialog
|
||||
- BUGFIX: Fix crash when deleting a torrent with no metadata (closes #667528)
|
||||
- BUGFIX: Fix possible crash on clicking a RSS article (closes #575624)
|
||||
- BUGFIX: Correctly update total number of torrents when a torrent is automatically removed (closes #668726)
|
||||
- BUGFIX: Correctly display the hash of torrents with no metadata
|
||||
- BUGFIX: Elide status bar text if it is too wide
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <QStringList>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QByteArray>
|
||||
#include <math.h>
|
||||
#include "misc.h"
|
||||
@@ -755,6 +756,7 @@ void QTorrentHandle::add_tracker(const announce_entry& url) {
|
||||
}
|
||||
|
||||
void QTorrentHandle::prioritize_first_last_piece(bool b) {
|
||||
qDebug() << Q_FUNC_INFO << b;
|
||||
Q_ASSERT(h.is_valid());
|
||||
// Detect main file
|
||||
int rank=0;
|
||||
|
||||
@@ -3,7 +3,7 @@ LANG_PATH = lang
|
||||
ICONS_PATH = Icons
|
||||
|
||||
# Set the following variable to 1 to enable debug
|
||||
DEBUG_MODE = 0
|
||||
DEBUG_MODE = 1
|
||||
|
||||
# Global
|
||||
TEMPLATE = app
|
||||
|
||||
@@ -140,6 +140,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, GUI *main_window, Bittor
|
||||
connect(BTSession, SIGNAL(pausedTorrent(QTorrentHandle&)), this, SLOT(pauseTorrent(QTorrentHandle&)));
|
||||
connect(BTSession, SIGNAL(resumedTorrent(QTorrentHandle&)), this, SLOT(resumeTorrent(QTorrentHandle&)));
|
||||
connect(BTSession, SIGNAL(torrentFinishedChecking(QTorrentHandle&)), this, SLOT(updateMetadata(QTorrentHandle&)));
|
||||
connect(BTSession, SIGNAL(deletedTorrent(QString)), SLOT(deleteTorrent(QString)));
|
||||
|
||||
// Listen for list events
|
||||
connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(torrentDoubleClicked(QModelIndex)));
|
||||
@@ -255,6 +256,13 @@ void TransferListWidget::pauseTorrent(QTorrentHandle &h) {
|
||||
pauseTorrent(getRowFromHash(h.hash()));
|
||||
}
|
||||
|
||||
void TransferListWidget::deleteTorrent(QString hash) {
|
||||
const int row = getRowFromHash(hash);
|
||||
if(row >= 0) {
|
||||
deleteTorrent(row, true);
|
||||
}
|
||||
}
|
||||
|
||||
void TransferListWidget::pauseTorrent(int row, bool refresh_list) {
|
||||
const QTorrentHandle h = BTSession->getTorrentHandle(getHashFromRow(row));
|
||||
listModel->setData(listModel->index(row, TR_DLSPEED), QVariant((double)0.0));
|
||||
|
||||
@@ -103,6 +103,7 @@ protected:
|
||||
|
||||
protected slots:
|
||||
int updateTorrent(int row);
|
||||
void deleteTorrent(QString hash);
|
||||
void deleteTorrent(int row, bool refresh_list=true);
|
||||
void pauseTorrent(int row, bool refresh_list=true);
|
||||
void resumeTorrent(int row, bool refresh_list=true);
|
||||
|
||||
Reference in New Issue
Block a user