mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 14:04:23 +00:00
- Fix addInPause setting in torrent addition dialog
This commit is contained in:
parent
63170b9214
commit
52dd1476db
@ -157,6 +157,7 @@ public:
|
|||||||
// Methods
|
// Methods
|
||||||
int getCurrentTabIndex() const;
|
int getCurrentTabIndex() const;
|
||||||
QPoint screenCenter() const;
|
QPoint screenCenter() const;
|
||||||
|
TransferListWidget* getTransferList() const { return transferList; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,6 +52,8 @@
|
|||||||
#include "torrentpersistentdata.h"
|
#include "torrentpersistentdata.h"
|
||||||
#include "torrentfilesmodel.h"
|
#include "torrentfilesmodel.h"
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
|
#include "GUI.h"
|
||||||
|
#include "transferlistwidget.h"
|
||||||
|
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
|
|
||||||
@ -72,9 +74,10 @@ private:
|
|||||||
bool is_magnet;
|
bool is_magnet;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
torrentAdditionDialog(QWidget *parent, Bittorrent* _BTSession) : QDialog(parent) {
|
torrentAdditionDialog(GUI *parent, Bittorrent* _BTSession) : QDialog((QWidget*)parent) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
connect(this, SIGNAL(torrentPaused(QTorrentHandle&)), parent->getTransferList(), SLOT(pauseTorrent(QTorrentHandle&)));
|
||||||
BTSession = _BTSession;
|
BTSession = _BTSession;
|
||||||
// Set Properties list model
|
// Set Properties list model
|
||||||
PropListModel = new TorrentFilesModel();
|
PropListModel = new TorrentFilesModel();
|
||||||
@ -484,10 +487,15 @@ public slots:
|
|||||||
h = BTSession->addMagnetUri(from_url, false);
|
h = BTSession->addMagnetUri(from_url, false);
|
||||||
else
|
else
|
||||||
h = BTSession->addTorrent(filePath, false, from_url);
|
h = BTSession->addTorrent(filePath, false, from_url);
|
||||||
if(addInPause->isChecked() && h.is_valid())
|
if(addInPause->isChecked() && h.is_valid()) {
|
||||||
h.pause();
|
h.pause();
|
||||||
|
emit torrentPaused(h);
|
||||||
|
}
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void torrentPaused(QTorrentHandle &h);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -83,7 +83,6 @@ protected slots:
|
|||||||
void displayListMenu(const QPoint&);
|
void displayListMenu(const QPoint&);
|
||||||
void updateMetadata(QTorrentHandle &h);
|
void updateMetadata(QTorrentHandle &h);
|
||||||
void currentChanged(const QModelIndex& current, const QModelIndex&);
|
void currentChanged(const QModelIndex& current, const QModelIndex&);
|
||||||
void pauseTorrent(QTorrentHandle &h);
|
|
||||||
void resumeTorrent(QTorrentHandle &h);
|
void resumeTorrent(QTorrentHandle &h);
|
||||||
#ifdef LIBTORRENT_0_15
|
#ifdef LIBTORRENT_0_15
|
||||||
void toggleSelectedTorrentsSuperSeeding();
|
void toggleSelectedTorrentsSuperSeeding();
|
||||||
@ -96,6 +95,7 @@ protected slots:
|
|||||||
public slots:
|
public slots:
|
||||||
void refreshList();
|
void refreshList();
|
||||||
void addTorrent(QTorrentHandle& h);
|
void addTorrent(QTorrentHandle& h);
|
||||||
|
void pauseTorrent(QTorrentHandle &h);
|
||||||
void setFinished(QTorrentHandle &h);
|
void setFinished(QTorrentHandle &h);
|
||||||
void setSelectionLabel(QString label);
|
void setSelectionLabel(QString label);
|
||||||
void setRefreshInterval(int t);
|
void setRefreshInterval(int t);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user