From a7cf8cea3fceabaf835e38e81581bb6fca1eeb56 Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Fri, 16 Oct 2015 09:36:22 +0300 Subject: [PATCH] Fix possible compilation error. Closes #3947. --- src/gui/mainwindow.cpp | 4 ++-- src/gui/mainwindow.h | 4 ++-- src/gui/trackerlogin.cpp | 4 ++-- src/gui/trackerlogin.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 9a1cfded2..580f39995 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -1157,7 +1157,7 @@ void MainWindow::loadPreferences(bool configure_session) qDebug("GUI settings loaded"); } -void MainWindow::addUnauthenticatedTracker(const QPair &tracker) +void MainWindow::addUnauthenticatedTracker(const QPair &tracker) { // Trackers whose authentication was cancelled if (unauthenticated_trackers.indexOf(tracker) < 0) @@ -1167,7 +1167,7 @@ void MainWindow::addUnauthenticatedTracker(const QPair(torrent, torrent->currentTracker())) < 0) + if (unauthenticated_trackers.indexOf(qMakePair(torrent, torrent->currentTracker())) < 0) // Tracker login new trackerLogin(this, torrent); } diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 97c4b102f..a8cd49944 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -126,7 +126,7 @@ protected slots: void on_actionOpen_triggered(); void updateGUI(); void loadPreferences(bool configure_session = true); - void addUnauthenticatedTracker(const QPair &tracker); + void addUnauthenticatedTracker(const QPair &tracker); void addTorrentFailed(const QString &error) const; void finishedTorrent(BitTorrent::TorrentHandle *const torrent) const; void askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHandle *const torrent); @@ -164,7 +164,7 @@ private slots: private: QFileSystemWatcher *executable_watcher; // Bittorrent - QList > unauthenticated_trackers; // Still needed? + QList> unauthenticated_trackers; // Still needed? // GUI related bool m_posInitialized; QTabWidget *tabs; diff --git a/src/gui/trackerlogin.cpp b/src/gui/trackerlogin.cpp index ecc88355c..01acc782d 100644 --- a/src/gui/trackerlogin.cpp +++ b/src/gui/trackerlogin.cpp @@ -39,7 +39,7 @@ trackerLogin::trackerLogin(QWidget *parent, BitTorrent::TorrentHandle *const tor setAttribute(Qt::WA_DeleteOnClose); login_logo->setPixmap(QPixmap(QString::fromUtf8(":/icons/oxygen/encrypted.png"))); tracker_url->setText(torrent->currentTracker()); - connect(this, SIGNAL(trackerLoginCancelled(QPair)), parent, SLOT(addUnauthenticatedTracker(QPair))); + connect(this, SIGNAL(trackerLoginCancelled(QPair)), parent, SLOT(addUnauthenticatedTracker(QPair))); show(); } @@ -53,6 +53,6 @@ void trackerLogin::on_loginButton_clicked() { void trackerLogin::on_cancelButton_clicked() { // Emit a signal to GUI to stop asking for authentication - emit trackerLoginCancelled(QPair(m_torrent, m_torrent->currentTracker())); + emit trackerLoginCancelled(qMakePair(m_torrent, m_torrent->currentTracker())); close(); } diff --git a/src/gui/trackerlogin.h b/src/gui/trackerlogin.h index 906011803..780162dca 100644 --- a/src/gui/trackerlogin.h +++ b/src/gui/trackerlogin.h @@ -51,7 +51,7 @@ class trackerLogin : public QDialog, private Ui::authentication{ ~trackerLogin(); signals: - void trackerLoginCancelled(QPair tracker); + void trackerLoginCancelled(QPair tracker); public slots: void on_loginButton_clicked();