diff options
| author | Christoph Berg <myon@debian.org> | 2021-02-03 22:55:29 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-02-03 22:55:29 +0100 |
| commit | 55305a51ab218d83b04c669d2d4802c08b9bfd22 (patch) | |
| tree | ea207dc64335f601eb64815cb20ca767cb7b302f /Configuration.cpp | |
| parent | 40574b7e2351202c19ca28e5f133511878d7ac3f (diff) | |
| parent | 1c4a8c9374cacfc002e47c8e3bb824e82aa8441c (diff) | |
Update upstream source from tag 'upstream/2.4.0_rc1+repack'
Update to upstream version '2.4.0~rc1+repack'
with Debian dir 0eeb5347725d90ba31891461bba2ac808f205c0b
Diffstat (limited to 'Configuration.cpp')
| -rw-r--r-- | Configuration.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Configuration.cpp b/Configuration.cpp index 2b668f90..197018ad 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -2992,13 +2992,18 @@ void Configuration::impl::load_network_interfaces (CheckableItemComboBox * combo auto flags = QNetworkInterface::IsUp | QNetworkInterface::CanMulticast; if ((net_if.flags () & flags) == flags) { + bool check_it = current.contains (net_if.name ()); if (net_if.flags () & QNetworkInterface::IsLoopBack) { loopback_interface_name_ = net_if.name (); + if (!current.size ()) + { + check_it = true; + } } auto item = combo_box->addCheckItem (net_if.humanReadableName () , net_if.name () - , current.contains (net_if.name ()) ? Qt::Checked : Qt::Unchecked); + , check_it ? Qt::Checked : Qt::Unchecked); auto tip = QString {"name(index): %1(%2) - %3"}.arg (net_if.name ()).arg (net_if.index ()) .arg (net_if.flags () & QNetworkInterface::IsUp ? "Up" : "Down"); auto hw_addr = net_if.hardwareAddress (); |
