mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-23 17:59:44 +00:00
- Added a signal in upnp to display an error on GUI when no wan service is detected (still unused)
This commit is contained in:
parent
fd3e60bce1
commit
ebc9d62f69
2
INSTALL
2
INSTALL
@ -26,7 +26,7 @@ Dependencies:
|
||||
|
||||
- libcurl
|
||||
|
||||
- libupnp (>= 1.2.1)
|
||||
- libupnp (>= 1.2.1) *OPTIONAL*
|
||||
|
||||
- python >= 2.3 (previous might work - not tested): needed by search engine.
|
||||
|
||||
|
@ -886,6 +886,7 @@ bool CUPnPControlPoint::AddPortMappings(
|
||||
{
|
||||
std::ostringstream msg;
|
||||
if (!WanServiceDetected()) {
|
||||
emit noWanServiceDetected();
|
||||
msg << "UPnP Error: "
|
||||
"CUPnPControlPoint::AddPortMapping: "
|
||||
"Wan Service not detected.";
|
||||
|
17
src/UPnP.h
17
src/UPnP.h
@ -33,6 +33,7 @@
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <QObject>
|
||||
|
||||
#include <upnp/upnp.h>
|
||||
#include <upnp/upnptools.h>
|
||||
@ -49,14 +50,6 @@
|
||||
|
||||
#include <QWaitCondition>
|
||||
|
||||
/**
|
||||
* Case insensitive std::string comparison
|
||||
*/
|
||||
bool stdStringIsEqualCI(
|
||||
const std::string &s1,
|
||||
const std::string &s2);
|
||||
|
||||
|
||||
class CUPnPPortMapping
|
||||
{
|
||||
private:
|
||||
@ -555,8 +548,9 @@ typedef std::map<const std::string, CUPnPService *> ServiceMap;
|
||||
typedef std::map<const std::string, CUPnPPortMapping> PortMappingMap;
|
||||
|
||||
|
||||
class CUPnPControlPoint
|
||||
{
|
||||
class CUPnPControlPoint : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
static CUPnPControlPoint *s_CtrlPoint;
|
||||
// upnp stuff
|
||||
@ -603,6 +597,9 @@ public:
|
||||
void* Event,
|
||||
void* Cookie);
|
||||
|
||||
signals:
|
||||
void noWanServiceDetected();
|
||||
|
||||
private:
|
||||
void OnEventReceived(
|
||||
const std::string &Sid,
|
||||
|
Loading…
Reference in New Issue
Block a user