mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 03:06:37 +03:00
- Fix some other listen port issues
This commit is contained in:
parent
1bfadf5219
commit
ff5e5d1062
2 changed files with 19 additions and 22 deletions
|
@ -254,15 +254,10 @@ void Bittorrent::configureSession() {
|
|||
// Connection
|
||||
// * Ports binding
|
||||
unsigned short old_listenPort = getListenPort();
|
||||
unsigned short new_listenPort;
|
||||
if(old_listenPort != Preferences::getSessionPort()) {
|
||||
setListeningPort(Preferences::getSessionPort());
|
||||
new_listenPort = getListenPort();
|
||||
if(new_listenPort != old_listenPort) {
|
||||
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
|
||||
}
|
||||
} else {
|
||||
new_listenPort = old_listenPort;
|
||||
unsigned short new_listenPort = Preferences::getSessionPort();
|
||||
if(old_listenPort != new_listenPort) {
|
||||
setListeningPort(new_listenPort);
|
||||
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
|
||||
}
|
||||
// * Global download limit
|
||||
int down_limit = Preferences::getGlobalDownloadLimit();
|
||||
|
@ -366,8 +361,10 @@ void Bittorrent::configureSession() {
|
|||
if(Preferences::isDHTEnabled()) {
|
||||
// Set DHT Port
|
||||
if(enableDHT(true)) {
|
||||
int dht_port = new_listenPort;
|
||||
if(!Preferences::isDHTPortSameAsBT())
|
||||
int dht_port;
|
||||
if(Preferences::isDHTPortSameAsBT())
|
||||
dht_port = new_listenPort;
|
||||
else
|
||||
dht_port = Preferences::getDHTPort();
|
||||
setDHTPort(dht_port);
|
||||
addConsoleMessage(tr("DHT support [ON], port: UDP/%1").arg(dht_port), QString::fromUtf8("blue"));
|
||||
|
@ -1349,7 +1346,7 @@ void Bittorrent::changeLabelInTorrentSavePath(QTorrentHandle h, QString old_labe
|
|||
TorrentPersistentData::saveSavePath(h.hash(), new_save_path);
|
||||
if(move_storage) {
|
||||
// Move storage
|
||||
h.move_storage(new_save_path);
|
||||
h.move_storage(new_save_path);
|
||||
}
|
||||
emit savePathChanged(h);
|
||||
}
|
||||
|
|
|
@ -1113,7 +1113,7 @@ QGroupBox {
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>451</width>
|
||||
<width>602</width>
|
||||
<height>505</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -1534,8 +1534,8 @@ QGroupBox {
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>466</width>
|
||||
<height>368</height>
|
||||
<width>620</width>
|
||||
<height>495</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_19">
|
||||
|
@ -1599,7 +1599,7 @@ QGroupBox {
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1000</number>
|
||||
<number>1024</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65525</number>
|
||||
|
@ -2345,8 +2345,8 @@ QGroupBox {
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>620</width>
|
||||
<height>495</height>
|
||||
<width>290</width>
|
||||
<height>124</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_21">
|
||||
|
@ -2442,8 +2442,8 @@ QGroupBox {
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>620</width>
|
||||
<height>495</height>
|
||||
<width>219</width>
|
||||
<height>221</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||
|
@ -2606,8 +2606,8 @@ QGroupBox {
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>620</width>
|
||||
<height>495</height>
|
||||
<width>452</width>
|
||||
<height>192</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_24">
|
||||
|
|
Loading…
Reference in a new issue