mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 11:49:01 +03:00
Merge pull request #3951 from glassez/const
Fix possible compilation error. Closes #3947.
This commit is contained in:
commit
f6a620cf6e
4 changed files with 7 additions and 7 deletions
|
@ -1157,7 +1157,7 @@ void MainWindow::loadPreferences(bool configure_session)
|
|||
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
|
||||
if (unauthenticated_trackers.indexOf(tracker) < 0)
|
||||
|
@ -1167,7 +1167,7 @@ void MainWindow::addUnauthenticatedTracker(const QPair<BitTorrent::TorrentHandle
|
|||
// Called when a tracker requires authentication
|
||||
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
|
||||
new trackerLogin(this, torrent);
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ protected slots:
|
|||
void on_actionOpen_triggered();
|
||||
void updateGUI();
|
||||
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 finishedTorrent(BitTorrent::TorrentHandle *const torrent) const;
|
||||
void askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHandle *const torrent);
|
||||
|
@ -164,7 +164,7 @@ private slots:
|
|||
private:
|
||||
QFileSystemWatcher *executable_watcher;
|
||||
// Bittorrent
|
||||
QList<QPair<BitTorrent::TorrentHandle *const, QString> > unauthenticated_trackers; // Still needed?
|
||||
QList<QPair<BitTorrent::TorrentHandle*, QString>> unauthenticated_trackers; // Still needed?
|
||||
// GUI related
|
||||
bool m_posInitialized;
|
||||
QTabWidget *tabs;
|
||||
|
|
|
@ -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<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();
|
||||
}
|
||||
|
||||
|
@ -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<BitTorrent::TorrentHandle *const, QString>(m_torrent, m_torrent->currentTracker()));
|
||||
emit trackerLoginCancelled(qMakePair(m_torrent, m_torrent->currentTracker()));
|
||||
close();
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ class trackerLogin : public QDialog, private Ui::authentication{
|
|||
~trackerLogin();
|
||||
|
||||
signals:
|
||||
void trackerLoginCancelled(QPair<BitTorrent::TorrentHandle *const, QString> tracker);
|
||||
void trackerLoginCancelled(QPair<BitTorrent::TorrentHandle*, QString> tracker);
|
||||
|
||||
public slots:
|
||||
void on_loginButton_clicked();
|
||||
|
|
Loading…
Reference in a new issue