- FEATURE: A random listening port can be chosen automatically

This commit is contained in:
Christophe Dumez 2009-08-25 09:19:02 +00:00
parent 3fa14cd47f
commit 9a14c4c599
10 changed files with 47 additions and 66 deletions

View file

@ -1027,7 +1027,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
// Connection
// * Ports binding
unsigned short old_listenPort = BTSession->getListenPort();
BTSession->setListeningPortsRange(options->getPorts());
BTSession->setListeningPort(options->getPort());
unsigned short new_listenPort = BTSession->getListenPort();
if(new_listenPort != old_listenPort) {
BTSession->addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));