- Fixed UPnP messages

This commit is contained in:
Christophe Dumez 2008-01-03 16:17:01 +00:00
parent c6abdacadd
commit 8d1f1512b0
4 changed files with 6 additions and 6 deletions

View file

@ -1163,7 +1163,7 @@ void bittorrent::readAlerts() {
}
else if (portmap_alert* p = dynamic_cast<portmap_alert*>(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<peer_blocked_alert*>(a.get())) {
emit peerBlocked(QString::fromUtf8(p->ip.to_string().c_str()));

View file

@ -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

View file

@ -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

View file

@ -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();