Skip to content

Commit

Permalink
- Allow to change UPnP port while it is enabled
Browse files Browse the repository at this point in the history
- Allow to change qBT style! (GTK people should like Cleanlooks style)
  • Loading branch information
Christophe Dumez committed Mar 28, 2007
1 parent e0a0a0b commit 92f8405
Show file tree
Hide file tree
Showing 58 changed files with 11,086 additions and 4,484 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- FEATURE: Added UPnP port forwarding support
- FEATURE: Display more infos about the torrent in its properties
- FEATURE: Allow the user to edit torrents' trackers
- FEATURE: Allow user to change qBT's style (Plastique, Cleanlooks, Motif, CDE, MacOSX, WinXP)
- COSMETIC: Redesigned torrent properties a little
- COSMETIC: Redesigned options a little

Expand Down
18 changes: 9 additions & 9 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@
- Option to shutdown computer when downloads are finished
- Add a torrent scheduler

// in v0.10 (partial)
- Download from RSS feeds (WIP by gtsoul in RSS_SUPPORT branch)
- Move finished torrent to another tab and keep on seeding them even after restart
// in v0.10 (partial) - WIP
- Download from RSS feeds (WIP by gtsoul in RSS_SUPPORT branch, clean & finish rss.h, merge with trunk, add a tab in mainWindow, debug)
- Move finished torrent to another tab and keep on seeding them even after restart (better for sharing)
- Improve torrent creation dialog (look & features) :
- Add Private combobox (allow to share on DHT or not)
- Use a QListWidget to allow multiple input paths
- Possibility to add url seeds
- Add IPv6 support (at least start working on it)
- UPnP support (debug, sync with aMule CVS)
- Allow user to change application style? (WinXP, MacOS, CleanLooks...) : app.setStyle(new QCleanlooksStyle());
- Add IPv6 support (at least start working on it, libtorrent seems to support it, we should limit our code to IPv4 anymore)
- UPnP support (debug, sync with next aMule release (or CVS)) : seems to be working!
- Update v0.9.0 changelog after its release
- Display Url seeds in torrent properties and allow to edit them
- Improve Ipfilter.dat parser (move to a thread ?)
- Improve Ipfilter.dat parser (move to a thread ? - too slow to load qBT and more importantly options)
- Use tooltips to explain options
- Exit confirmation only if there are active downloads
- Support UPnP port edition
- Exit confirmation only if there are active downloads (display number of downloads) - SMARTER
- Make use of QNetworkInterface (could be useful ?)
- Display more info in log (PeX, UPnP, DHT w/ ports...)
1 change: 1 addition & 0 deletions src/GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ void GUI::configureSession(bool deleteOptions){
// Upnp
if(options->isDHTEnabled()){
BTSession.enableUPnP(options->getUPnPPort());
BTSession.setUPnPPort(options->getUPnPPort());
}else{
BTSession.disableUPnP();
}
Expand Down
3 changes: 2 additions & 1 deletion src/UPnP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,8 @@ m_RootDeviceMap(),
m_ServiceMap(),
m_ActivePortMappingsMap(),
m_IGWDeviceDetected(false),
m_WanService(NULL)
m_WanService(NULL),
m_UPnPPort(udpPort)
{
// Pointer to self
s_CtrlPoint = this;
Expand Down
4 changes: 4 additions & 0 deletions src/UPnP.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ class CUPnPControlPoint
bool m_IGWDeviceDetected;
CUPnPService *m_WanService;
QMutex m_WaitForSearchTimeout;
unsigned short m_UPnPPort;

public:
CUPnPControlPoint(unsigned short udpPort);
Expand All @@ -650,6 +651,9 @@ class CUPnPControlPoint
std::vector<CUPnPPortMapping> &upnpPortMapping);
bool DeletePortMappings(
std::vector<CUPnPPortMapping> &upnpPortMapping);
unsigned short getUPnPPort() const{
return m_UPnPPort;
}

UpnpClient_Handle GetUPnPClientHandle() const
{ return m_UPnPClientHandle; }
Expand Down
16 changes: 16 additions & 0 deletions src/bittorrent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions src/bittorrent.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class bittorrent : public QObject{
#ifndef NO_UPNP
void enableUPnP(int port=50000);
void disableUPnP();
void setUPnPPort(int upnp_port);
#endif

protected slots:
Expand Down
Binary file modified src/lang/qbittorrent_bg.qm
Binary file not shown.
Loading

0 comments on commit 92f8405

Please sign in to comment.