mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
- Allow to change UPnP port while it is enabled
- Allow to change qBT style! (GTK people should like Cleanlooks style)
This commit is contained in:
parent
e0a0a0beb1
commit
92f840519c
58 changed files with 11121 additions and 4519 deletions
|
@ -90,6 +90,22 @@ void bittorrent::enableUPnP(int port){
|
|||
}
|
||||
}
|
||||
|
||||
// Set UPnP port (>= 1000)
|
||||
void bittorrent::setUPnPPort(int upnp_port){
|
||||
if(!UPnPEnabled){
|
||||
qDebug("Cannot set UPnP port because it is disabled");
|
||||
return;
|
||||
}
|
||||
if(m_upnp->getUPnPPort() != upnp_port){
|
||||
qDebug("Changing UPnP port to %d", upnp_port);
|
||||
delete m_upnp;
|
||||
m_upnp = new CUPnPControlPoint(upnp_port);
|
||||
m_upnp->AddPortMappings(m_upnpMappings);
|
||||
}else{
|
||||
qDebug("UPnP: No need to set the port, it is already listening on this port");
|
||||
}
|
||||
}
|
||||
|
||||
void bittorrent::disableUPnP(){
|
||||
if(UPnPEnabled){
|
||||
qDebug("Disabling UPnP");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue