Browse Source

Fix possible compilation error. Closes #3947.

adaptive-webui-19844
Vladimir Golovnev 9 years ago
parent
commit
a7cf8cea3f
  1. 4
      src/gui/mainwindow.cpp
  2. 4
      src/gui/mainwindow.h
  3. 4
      src/gui/trackerlogin.cpp
  4. 2
      src/gui/trackerlogin.h

4
src/gui/mainwindow.cpp

@ -1157,7 +1157,7 @@ void MainWindow::loadPreferences(bool configure_session)
qDebug("GUI settings loaded"); qDebug("GUI settings loaded");
} }
void MainWindow::addUnauthenticatedTracker(const QPair<BitTorrent::TorrentHandle *const, QString> &tracker) void MainWindow::addUnauthenticatedTracker(const QPair<BitTorrent::TorrentHandle*, QString> &tracker)
{ {
// Trackers whose authentication was cancelled // Trackers whose authentication was cancelled
if (unauthenticated_trackers.indexOf(tracker) < 0) if (unauthenticated_trackers.indexOf(tracker) < 0)
@ -1167,7 +1167,7 @@ void MainWindow::addUnauthenticatedTracker(const QPair<BitTorrent::TorrentHandle
// Called when a tracker requires authentication // Called when a tracker requires authentication
void MainWindow::trackerAuthenticationRequired(BitTorrent::TorrentHandle *const torrent) void MainWindow::trackerAuthenticationRequired(BitTorrent::TorrentHandle *const torrent)
{ {
if (unauthenticated_trackers.indexOf(QPair<BitTorrent::TorrentHandle *const, QString>(torrent, torrent->currentTracker())) < 0) if (unauthenticated_trackers.indexOf(qMakePair(torrent, torrent->currentTracker())) < 0)
// Tracker login // Tracker login
new trackerLogin(this, torrent); new trackerLogin(this, torrent);
} }

4
src/gui/mainwindow.h

@ -126,7 +126,7 @@ protected slots:
void on_actionOpen_triggered(); void on_actionOpen_triggered();
void updateGUI(); void updateGUI();
void loadPreferences(bool configure_session = true); void loadPreferences(bool configure_session = true);
void addUnauthenticatedTracker(const QPair<BitTorrent::TorrentHandle *const, QString> &tracker); void addUnauthenticatedTracker(const QPair<BitTorrent::TorrentHandle*, QString> &tracker);
void addTorrentFailed(const QString &error) const; void addTorrentFailed(const QString &error) const;
void finishedTorrent(BitTorrent::TorrentHandle *const torrent) const; void finishedTorrent(BitTorrent::TorrentHandle *const torrent) const;
void askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHandle *const torrent); void askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHandle *const torrent);
@ -164,7 +164,7 @@ private slots:
private: private:
QFileSystemWatcher *executable_watcher; QFileSystemWatcher *executable_watcher;
// Bittorrent // Bittorrent
QList<QPair<BitTorrent::TorrentHandle *const, QString> > unauthenticated_trackers; // Still needed? QList<QPair<BitTorrent::TorrentHandle*, QString>> unauthenticated_trackers; // Still needed?
// GUI related // GUI related
bool m_posInitialized; bool m_posInitialized;
QTabWidget *tabs; QTabWidget *tabs;

4
src/gui/trackerlogin.cpp

@ -39,7 +39,7 @@ trackerLogin::trackerLogin(QWidget *parent, BitTorrent::TorrentHandle *const tor
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
login_logo->setPixmap(QPixmap(QString::fromUtf8(":/icons/oxygen/encrypted.png"))); login_logo->setPixmap(QPixmap(QString::fromUtf8(":/icons/oxygen/encrypted.png")));
tracker_url->setText(torrent->currentTracker()); tracker_url->setText(torrent->currentTracker());
connect(this, SIGNAL(trackerLoginCancelled(QPair<BitTorrent::TorrentHandle *const, QString>)), parent, SLOT(addUnauthenticatedTracker(QPair<BitTorrent::TorrentHandle *const, QString>))); connect(this, SIGNAL(trackerLoginCancelled(QPair<BitTorrent::TorrentHandle*, QString>)), parent, SLOT(addUnauthenticatedTracker(QPair<BitTorrent::TorrentHandle*, QString>)));
show(); show();
} }
@ -53,6 +53,6 @@ void trackerLogin::on_loginButton_clicked() {
void trackerLogin::on_cancelButton_clicked() { void trackerLogin::on_cancelButton_clicked() {
// Emit a signal to GUI to stop asking for authentication // Emit a signal to GUI to stop asking for authentication
emit trackerLoginCancelled(QPair<BitTorrent::TorrentHandle *const, QString>(m_torrent, m_torrent->currentTracker())); emit trackerLoginCancelled(qMakePair(m_torrent, m_torrent->currentTracker()));
close(); close();
} }

2
src/gui/trackerlogin.h

@ -51,7 +51,7 @@ class trackerLogin : public QDialog, private Ui::authentication{
~trackerLogin(); ~trackerLogin();
signals: signals:
void trackerLoginCancelled(QPair<BitTorrent::TorrentHandle *const, QString> tracker); void trackerLoginCancelled(QPair<BitTorrent::TorrentHandle*, QString> tracker);
public slots: public slots:
void on_loginButton_clicked(); void on_loginButton_clicked();

Loading…
Cancel
Save