1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-12 07:48:04 +00:00

Fix duplicate network interfaces. Closes #5131

This commit is contained in:
ngosang 2016-04-17 20:55:01 +02:00
parent ab65c04e0e
commit 3a49485039

View File

@ -257,6 +257,12 @@ void AdvancedSettings::loadAdvancedSettings()
bool interface_exists = current_iface.isEmpty();
int i = 1;
foreach (const QNetworkInterface& iface, QNetworkInterface::allInterfaces()) {
// This line fixes a Qt bug => https://bugreports.qt.io/browse/QTBUG-52633
// Tested in Qt 5.6.0. For more info see:
// https://github.com/qbittorrent/qBittorrent/issues/5131
// https://github.com/qbittorrent/qBittorrent/pull/5135
if (iface.addressEntries().isEmpty()) continue;
if (iface.flags() & QNetworkInterface::IsLoopBack) continue;
combo_iface.addItem(iface.humanReadableName(), iface.name());
if (!current_iface.isEmpty() && (iface.name() == current_iface)) {