Browse Source

- Fixed UPnP messages

adaptive-webui-19844
Christophe Dumez 17 years ago
parent
commit
8d1f1512b0
  1. 2
      src/bittorrent.cpp
  2. 2
      src/bittorrent.h
  3. 6
      src/downloadingTorrents.cpp
  4. 2
      src/downloadingTorrents.h

2
src/bittorrent.cpp

@ -1163,7 +1163,7 @@ void bittorrent::readAlerts() { @@ -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()));

2
src/bittorrent.h

@ -169,7 +169,7 @@ class bittorrent : public QObject{ @@ -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

6
src/downloadingTorrents.cpp

@ -76,7 +76,7 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) @@ -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) { @@ -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

2
src/downloadingTorrents.h

@ -93,7 +93,7 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{ @@ -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();

Loading…
Cancel
Save