|
|
@ -35,7 +35,6 @@ |
|
|
|
#include <QHostAddress> |
|
|
|
#include <QHostAddress> |
|
|
|
#include <QNetworkAddressEntry> |
|
|
|
#include <QNetworkAddressEntry> |
|
|
|
#include <QProcess> |
|
|
|
#include <QProcess> |
|
|
|
#include <stdlib.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "smtp.h" |
|
|
|
#include "smtp.h" |
|
|
|
#include "filesystemwatcher.h" |
|
|
|
#include "filesystemwatcher.h" |
|
|
@ -291,7 +290,6 @@ void QBtSession::configureSession() { |
|
|
|
if (pref.useRandomPort()) { // to check if the randomPort checkbox is selected
|
|
|
|
if (pref.useRandomPort()) { // to check if the randomPort checkbox is selected
|
|
|
|
if (!m_randomPortEnabled) { |
|
|
|
if (!m_randomPortEnabled) { |
|
|
|
m_randomPortEnabled = true; |
|
|
|
m_randomPortEnabled = true; |
|
|
|
srand(time(0)); |
|
|
|
|
|
|
|
const unsigned short randomPort = rand() % USHRT_MAX + 1025; |
|
|
|
const unsigned short randomPort = rand() % USHRT_MAX + 1025; |
|
|
|
setListeningPort(randomPort); |
|
|
|
setListeningPort(randomPort); |
|
|
|
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg(QString::number(getListenPort()))); |
|
|
|
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg(QString::number(getListenPort()))); |
|
|
|