mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
BUGFIX: Fix 'Add in pause' setting in torrent addition dialog
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.0.7
|
||||
- BUGFIX: Fix 'Add in pause' setting in torrent addition dialog
|
||||
|
||||
* Tue Jan 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.6
|
||||
- BUGFIX: Fix detection of invalid torrent files
|
||||
- BUGFIX: Stop catching signals once one has been caught to avoid possible infinite loop
|
||||
|
||||
@@ -157,6 +157,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
// Methods
|
||||
int getCurrentTabIndex() const;
|
||||
QPoint screenCenter() const;
|
||||
TransferListWidget* getTransferList() const { return transferList; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
#include "torrentpersistentdata.h"
|
||||
#include "torrentfilesmodel.h"
|
||||
#include "preferences.h"
|
||||
#include "GUI.h"
|
||||
#include "transferlistwidget.h"
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
@@ -69,9 +71,10 @@ private:
|
||||
boost::intrusive_ptr<torrent_info> t;
|
||||
|
||||
public:
|
||||
torrentAdditionDialog(QWidget *parent, Bittorrent* _BTSession) : QDialog(parent) {
|
||||
torrentAdditionDialog(GUI *parent, Bittorrent* _BTSession) : QDialog((QWidget*)parent) {
|
||||
setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(this, SIGNAL(torrentPaused(QTorrentHandle&)), parent->getTransferList(), SLOT(pauseTorrent(QTorrentHandle&)));
|
||||
BTSession = _BTSession;
|
||||
// Set Properties list model
|
||||
PropListModel = new TorrentFilesModel();
|
||||
@@ -341,10 +344,15 @@ public slots:
|
||||
savePiecesPriorities();
|
||||
// Add to download list
|
||||
QTorrentHandle h = BTSession->addTorrent(filePath, false, from_url);
|
||||
if(addInPause->isChecked() && h.is_valid())
|
||||
if(addInPause->isChecked() && h.is_valid()) {
|
||||
h.pause();
|
||||
emit torrentPaused(h);
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
signals:
|
||||
void torrentPaused(QTorrentHandle &h);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -77,7 +77,6 @@ protected slots:
|
||||
void displayListMenu(const QPoint&);
|
||||
void updateMetadata(QTorrentHandle &h);
|
||||
void currentChanged(const QModelIndex& current, const QModelIndex&);
|
||||
void pauseTorrent(QTorrentHandle &h);
|
||||
void resumeTorrent(QTorrentHandle &h);
|
||||
#ifdef LIBTORRENT_0_15
|
||||
void toggleSelectedTorrentsSuperSeeding();
|
||||
@@ -89,6 +88,7 @@ protected slots:
|
||||
public slots:
|
||||
void refreshList();
|
||||
void addTorrent(QTorrentHandle& h);
|
||||
void pauseTorrent(QTorrentHandle &h);
|
||||
void setFinished(QTorrentHandle &h);
|
||||
void setRefreshInterval(int t);
|
||||
void startSelectedTorrents();
|
||||
|
||||
Reference in New Issue
Block a user