From 8d1f1512b070b3f44281782c9abe0f5d0777c745 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 3 Jan 2008 16:17:01 +0000 Subject: [PATCH] - Fixed UPnP messages --- src/bittorrent.cpp | 2 +- src/bittorrent.h | 2 +- src/downloadingTorrents.cpp | 6 +++--- src/downloadingTorrents.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index f28c2c4a5..b22803fc1 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1163,7 +1163,7 @@ void bittorrent::readAlerts() { } else if (portmap_alert* p = dynamic_cast(a.get())) { qDebug("UPnP Success, msg: %s", p->msg().c_str()); - emit UPnPSuccess(); + emit UPnPSuccess(QString(p->msg().c_str())); } else if (peer_blocked_alert* p = dynamic_cast(a.get())) { emit peerBlocked(QString::fromUtf8(p->ip.to_string().c_str())); diff --git a/src/bittorrent.h b/src/bittorrent.h index dd2453f9e..54333c112 100644 --- a/src/bittorrent.h +++ b/src/bittorrent.h @@ -169,7 +169,7 @@ class bittorrent : public QObject{ void torrentFinishedChecking(QString hash); void torrent_deleted(QString hash, QString fileName, bool finished); void UPnPError(QString msg); - void UPnPSuccess(); + void UPnPSuccess(QString msg); }; #endif diff --git a/src/downloadingTorrents.cpp b/src/downloadingTorrents.cpp index 2ec5a67a9..211c7832a 100644 --- a/src/downloadingTorrents.cpp +++ b/src/downloadingTorrents.cpp @@ -76,7 +76,7 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) connect(BTSession, SIGNAL(aboutToDownloadFromUrl(QString)), this, SLOT(displayDownloadingUrlInfos(QString))); connect(BTSession, SIGNAL(urlSeedProblem(QString, QString)), this, SLOT(addUrlSeedError(QString, QString))); connect(BTSession, SIGNAL(UPnPError(QString)), this, SLOT(displayUPnPError(QString))); - connect(BTSession, SIGNAL(UPnPSucess(QString)), this, SLOT(displayUPnPSucess(QString))); + connect(BTSession, SIGNAL(UPnPSuccess(QString)), this, SLOT(displayUPnPSuccess(QString))); // Load last columns width for download list if(!loadColWidthDLList()) { @@ -206,8 +206,8 @@ void DownloadingTorrents::displayUPnPError(QString msg) { setInfoBar(tr("UPnP/NAT-PMP: Port mapping failure, message: %1").arg(msg), QColor("red")); } -void DownloadingTorrents::displayUPnPSucess() { - DownloadingTorrents::setInfoBar(tr("UPnP/NAT-PMP: Port mapping successful"), QColor("blue")); +void DownloadingTorrents::displayUPnPSuccess(QString msg) { + DownloadingTorrents::setInfoBar(tr("UPnP/NAT-PMP: Port mapping successful, message: %1").arg(msg), QColor("blue")); } // Update Info Bar information diff --git a/src/downloadingTorrents.h b/src/downloadingTorrents.h index 0fa76e8f6..b57c23f4e 100644 --- a/src/downloadingTorrents.h +++ b/src/downloadingTorrents.h @@ -93,7 +93,7 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{ void hideOrShowColumnRatio(); void hideOrShowColumnEta(); void displayUPnPError(QString msg); - void displayUPnPSucess(); + void displayUPnPSuccess(QString msg); public slots: void updateDlList();