mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 22:52:33 -06:00
Remove generated include from headers
Not only fixes compilation with CMake 3.8 (without messing with include paths) but makes sources cleaner.
This commit is contained in:
@@ -28,19 +28,27 @@
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include "peersadditiondlg.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QHostAddress>
|
||||
|
||||
#include "peersadditiondlg.h"
|
||||
#include "ui_peersadditiondlg.h"
|
||||
|
||||
PeersAdditionDlg::PeersAdditionDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_ui(new Ui::addPeersDialog())
|
||||
{
|
||||
setupUi(this);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(validateInput()));
|
||||
m_ui->setupUi(this);
|
||||
connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(validateInput()));
|
||||
|
||||
label_format->hide();
|
||||
peers_txt->setPlaceholderText("Format: IPv4:port / [IPv6]:port");
|
||||
m_ui->label_format->hide();
|
||||
m_ui->peers_txt->setPlaceholderText("Format: IPv4:port / [IPv6]:port");
|
||||
}
|
||||
|
||||
PeersAdditionDlg::~PeersAdditionDlg()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
QList<BitTorrent::PeerAddress> PeersAdditionDlg::askForPeers()
|
||||
@@ -52,13 +60,13 @@ QList<BitTorrent::PeerAddress> PeersAdditionDlg::askForPeers()
|
||||
|
||||
void PeersAdditionDlg::validateInput()
|
||||
{
|
||||
if (peers_txt->toPlainText().trimmed().isEmpty()) {
|
||||
if (m_ui->peers_txt->toPlainText().trimmed().isEmpty()) {
|
||||
QMessageBox::warning(this, tr("No peer entered"),
|
||||
tr("Please type at least one peer."),
|
||||
QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
foreach (const QString &peer, peers_txt->toPlainText().trimmed().split("\n")) {
|
||||
foreach (const QString &peer, m_ui->peers_txt->toPlainText().trimmed().split("\n")) {
|
||||
BitTorrent::PeerAddress addr = parsePeer(peer);
|
||||
if (!addr.ip.isNull()) {
|
||||
m_peersList.append(addr);
|
||||
|
||||
Reference in New Issue
Block a user