mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Migrate last setting related to interfaces to the new system.
This commit is contained in:
parent
7bf06cd6e6
commit
f391b24b1d
6 changed files with 18 additions and 15 deletions
|
@ -146,11 +146,11 @@ void AdvancedSettings::saveAdvancedSettings()
|
|||
if (combo_iface.currentIndex() == 0) {
|
||||
// All interfaces (default)
|
||||
session->setNetworkInterface(QString());
|
||||
pref->setNetworkInterfaceName(QString());
|
||||
session->setNetworkInterfaceName(QString());
|
||||
}
|
||||
else {
|
||||
session->setNetworkInterface(combo_iface.itemData(combo_iface.currentIndex()).toString());
|
||||
pref->setNetworkInterfaceName(combo_iface.currentText());
|
||||
session->setNetworkInterfaceName(combo_iface.currentText());
|
||||
}
|
||||
|
||||
// Interface address
|
||||
|
@ -333,7 +333,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||
}
|
||||
// Saved interface does not exist, show it anyway
|
||||
if (!interface_exists) {
|
||||
combo_iface.addItem(pref->getNetworkInterfaceName(), current_iface);
|
||||
combo_iface.addItem(session->networkInterfaceName(), current_iface);
|
||||
combo_iface.setCurrentIndex(i);
|
||||
}
|
||||
addRow(NETWORK_IFACE, tr("Network Interface (requires restart)"), &combo_iface);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue