mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 06:02:29 -06:00
Split trackerlogin into .h and .cpp
This commit is contained in:
@@ -32,9 +32,6 @@
|
||||
#define TRACKERLOGIN_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <libtorrent/session.hpp>
|
||||
|
||||
#include "ui_login.h"
|
||||
#include "qtorrenthandle.h"
|
||||
@@ -46,32 +43,15 @@ class trackerLogin : public QDialog, private Ui::authentication{
|
||||
QTorrentHandle h;
|
||||
|
||||
public:
|
||||
trackerLogin(QWidget *parent, QTorrentHandle h): QDialog(parent), h(h) {
|
||||
setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
login_logo->setPixmap(QPixmap(QString::fromUtf8(":/Icons/oxygen/encrypted.png")));
|
||||
tracker_url->setText(h.current_tracker());
|
||||
connect(this, SIGNAL(trackerLoginCancelled(QPair<QTorrentHandle,QString>)), parent, SLOT(addUnauthenticatedTracker(QPair<QTorrentHandle,QString>)));
|
||||
show();
|
||||
}
|
||||
|
||||
~trackerLogin() {}
|
||||
trackerLogin(QWidget *parent, QTorrentHandle h);
|
||||
~trackerLogin();
|
||||
|
||||
signals:
|
||||
void trackerLoginCancelled(QPair<QTorrentHandle,QString> tracker);
|
||||
|
||||
public slots:
|
||||
void on_loginButton_clicked() {
|
||||
// login
|
||||
h.set_tracker_login(lineUsername->text(), linePasswd->text());
|
||||
close();
|
||||
}
|
||||
|
||||
void on_cancelButton_clicked() {
|
||||
// Emit a signal to GUI to stop asking for authentication
|
||||
emit trackerLoginCancelled(QPair<QTorrentHandle,QString>(h, h.current_tracker()));
|
||||
close();
|
||||
}
|
||||
void on_loginButton_clicked();
|
||||
void on_cancelButton_clicked();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user