mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Fix trackersadditiondlg position
This commit is contained in:
parent
bd2f69a9d6
commit
f36e891010
@ -347,7 +347,7 @@ void TrackerList::askForTrackers() {
|
||||
if (!torrent) return;
|
||||
|
||||
QList<BitTorrent::TrackerEntry> trackers;
|
||||
foreach (const QString &tracker, TrackersAdditionDlg::askForTrackers(torrent))
|
||||
foreach (const QString &tracker, TrackersAdditionDlg::askForTrackers(this, torrent))
|
||||
trackers << tracker;
|
||||
torrent->addTrackers(trackers);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "guiiconprovider.h"
|
||||
#include "ui_trackersadditiondlg.h"
|
||||
|
||||
TrackersAdditionDlg::TrackersAdditionDlg(BitTorrent::TorrentHandle *const torrent, QWidget *parent)
|
||||
TrackersAdditionDlg::TrackersAdditionDlg(QWidget *parent, BitTorrent::TorrentHandle *const torrent)
|
||||
: QDialog(parent)
|
||||
, m_ui(new Ui::TrackersAdditionDlg())
|
||||
, m_torrent(torrent)
|
||||
@ -132,10 +132,10 @@ void TrackersAdditionDlg::getTrackerError(const QString &, const QString &error)
|
||||
QMessageBox::warning(this, tr("Download error"), tr("The trackers list could not be downloaded, reason: %1").arg(error), QMessageBox::Ok);
|
||||
}
|
||||
|
||||
QStringList TrackersAdditionDlg::askForTrackers(BitTorrent::TorrentHandle *const torrent)
|
||||
QStringList TrackersAdditionDlg::askForTrackers(QWidget *parent, BitTorrent::TorrentHandle *const torrent)
|
||||
{
|
||||
QStringList trackers;
|
||||
TrackersAdditionDlg dlg(torrent);
|
||||
TrackersAdditionDlg dlg(parent, torrent);
|
||||
if (dlg.exec() == QDialog::Accepted)
|
||||
return dlg.newTrackers();
|
||||
|
||||
|
@ -51,11 +51,11 @@ class TrackersAdditionDlg : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TrackersAdditionDlg(BitTorrent::TorrentHandle *const torrent, QWidget *parent = 0);
|
||||
TrackersAdditionDlg(QWidget *parent, BitTorrent::TorrentHandle *const torrent);
|
||||
~TrackersAdditionDlg();
|
||||
|
||||
QStringList newTrackers() const;
|
||||
static QStringList askForTrackers(BitTorrent::TorrentHandle *const torrent);
|
||||
static QStringList askForTrackers(QWidget *parent, BitTorrent::TorrentHandle *const torrent);
|
||||
|
||||
public slots:
|
||||
void on_uTorrentListButton_clicked();
|
||||
|
@ -26,13 +26,6 @@
|
||||
<property name="lineWrapMode">
|
||||
<enum>QTextEdit::NoWrap</enum>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -51,23 +44,7 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QLineEdit" name="list_url"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="uTorrentListButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="uTorrentListButton"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user