From 1dadbd47b2ac9b1fc47d1c8d13d0b2ce0afe5da1 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Mon, 26 Jun 2023 08:36:56 +0200 Subject: [PATCH] lanlinkprovider: Load backend explicitly to avoid nullptr warning This is needed to make it work properly with Qt6 at runtime --- core/backends/lan/lanlinkprovider.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp index 3a1e46701..af0019107 100644 --- a/core/backends/lan/lanlinkprovider.cpp +++ b/core/backends/lan/lanlinkprovider.cpp @@ -72,6 +72,7 @@ LanLinkProvider::LanLinkProvider(bool testMode, quint16 udpBroadcastPort, quint1 }); #else // 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]() { if (QNetworkInformation::instance()->reachability() == QNetworkInformation::Reachability::Online) { onNetworkChange();