mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-05 11:24:15 +00:00
Fix peeradditiondlg position
This commit is contained in:
parent
6f6fe626a1
commit
bd2f69a9d6
@ -245,7 +245,7 @@ void PeerListWidget::showPeerListMenu(const QPoint &)
|
||||
QAction *act = menu.exec(QCursor::pos());
|
||||
if (act == 0) return;
|
||||
if (act == addPeerAct) {
|
||||
QList<BitTorrent::PeerAddress> peersList = PeersAdditionDlg::askForPeers();
|
||||
QList<BitTorrent::PeerAddress> peersList = PeersAdditionDlg::askForPeers(this);
|
||||
int peerCount = 0;
|
||||
foreach (const BitTorrent::PeerAddress &addr, peersList) {
|
||||
if (torrent->connectPeer(addr)) {
|
||||
|
@ -51,9 +51,9 @@ PeersAdditionDlg::~PeersAdditionDlg()
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
QList<BitTorrent::PeerAddress> PeersAdditionDlg::askForPeers()
|
||||
QList<BitTorrent::PeerAddress> PeersAdditionDlg::askForPeers(QWidget *parent)
|
||||
{
|
||||
PeersAdditionDlg dlg;
|
||||
PeersAdditionDlg dlg(parent);
|
||||
dlg.exec();
|
||||
return dlg.m_peersList;
|
||||
}
|
||||
|
@ -47,10 +47,10 @@ class PeersAdditionDlg: public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PeersAdditionDlg(QWidget *parent = 0);
|
||||
PeersAdditionDlg(QWidget *parent);
|
||||
~PeersAdditionDlg();
|
||||
|
||||
static QList<BitTorrent::PeerAddress> askForPeers();
|
||||
static QList<BitTorrent::PeerAddress> askForPeers(QWidget *parent);
|
||||
|
||||
protected slots:
|
||||
void validateInput();
|
||||
|
@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>List of peers to add (one per line):</string>
|
||||
<string>List of peers to add (one IP per line):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -40,9 +40,6 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user