lanlinkprovider: Load backend explicitly to avoid nullptr warning
This is needed to make it work properly with Qt6 at runtime
This commit is contained in:
parent
f57d59e605
commit
1dadbd47b2
1 changed files with 1 additions and 0 deletions
|
@ -72,6 +72,7 @@ LanLinkProvider::LanLinkProvider(bool testMode, quint16 udpBroadcastPort, quint1
|
||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
// 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
|
||||||
|
QNetworkInformation::instance()->loadBackendByFeatures(QNetworkInformation::Feature::Reachability);
|
||||||
connect(QNetworkInformation::instance(), &QNetworkInformation::reachabilityChanged, this, [this]() {
|
connect(QNetworkInformation::instance(), &QNetworkInformation::reachabilityChanged, this, [this]() {
|
||||||
if (QNetworkInformation::instance()->reachability() == QNetworkInformation::Reachability::Online) {
|
if (QNetworkInformation::instance()->reachability() == QNetworkInformation::Reachability::Online) {
|
||||||
onNetworkChange();
|
onNetworkChange();
|
||||||
|
|
Loading…
Reference in a new issue