Missing ifdef

This commit is contained in:
Albert Vaca Cintora 2023-07-17 23:21:02 +02:00
parent 0327fc08d1
commit 3d1c01e4d7

View file

@ -68,14 +68,18 @@ LanLinkProvider::LanLinkProvider(bool testMode, quint16 udpBroadcastPort, quint1
if (m_lastConfig != config && config.state() == QNetworkConfiguration::Active) { if (m_lastConfig != config && config.state() == QNetworkConfiguration::Active) {
m_lastConfig = config; m_lastConfig = config;
onNetworkChange(); onNetworkChange();
#ifdef KDECONNECT_MDNS
m_mdnsDiscovery.onNetworkChange(); m_mdnsDiscovery.onNetworkChange();
#endif
} }
}); });
#else #else
const auto checkNetworkChange = [this]() { const auto checkNetworkChange = [this]() {
if (QNetworkInformation::instance()->reachability() == QNetworkInformation::Reachability::Online) { if (QNetworkInformation::instance()->reachability() == QNetworkInformation::Reachability::Online) {
onNetworkChange(); onNetworkChange();
#ifdef KDECONNECT_MDNS
m_mdnsDiscovery.onNetworkChange(); m_mdnsDiscovery.onNetworkChange();
#endif
} }
}; };
// Detect when a network interface changes status, so we announce ourselves in the new network // Detect when a network interface changes status, so we announce ourselves in the new network