mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06: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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user