Browse Source

Fix trackersadditiondlg position

adaptive-webui-19844
Chocobo1 9 years ago
parent
commit
f36e891010
  1. 2
      src/gui/properties/trackerlist.cpp
  2. 6
      src/gui/properties/trackersadditiondlg.cpp
  3. 4
      src/gui/properties/trackersadditiondlg.h
  4. 25
      src/gui/properties/trackersadditiondlg.ui

2
src/gui/properties/trackerlist.cpp

@ -347,7 +347,7 @@ void TrackerList::askForTrackers() { @@ -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);
}

6
src/gui/properties/trackersadditiondlg.cpp

@ -43,7 +43,7 @@ @@ -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) @@ -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();

4
src/gui/properties/trackersadditiondlg.h

@ -51,11 +51,11 @@ class TrackersAdditionDlg : public QDialog @@ -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();

25
src/gui/properties/trackersadditiondlg.ui

@ -26,13 +26,6 @@ @@ -26,13 +26,6 @@
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
<property name="html">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
@ -51,23 +44,7 @@ p, li { white-space: pre-wrap; } @@ -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…
Cancel
Save