diff --git a/src/modules/welcome/checker/RequirementsChecker.cpp b/src/modules/welcome/checker/RequirementsChecker.cpp index 3d7eb7da7..6bfc31ab7 100644 --- a/src/modules/welcome/checker/RequirementsChecker.cpp +++ b/src/modules/welcome/checker/RequirementsChecker.cpp @@ -36,7 +36,9 @@ #include #include #include -#include +#include +#include + #include #include @@ -337,8 +339,20 @@ RequirementsChecker::checkHasPower() bool RequirementsChecker::checkHasInternet() { - // default to true in the QNetworkAccessManager::UnknownAccessibility case - bool hasInternet = QNetworkAccessManager(this).networkAccessible() != QNetworkAccessManager::NotAccessible; + // doc from: https://doc.qt.io/qt-5/qnetworkconfigurationmanager.html#isOnline + bool hasInternet = false; + + QNetworkConfigurationManager mgr; + QList activeConfigs = mgr.allConfigurations(QNetworkConfiguration::Active); + + if (activeConfigs.count() > 0) { + Q_ASSERT(mgr.isOnline()); + hasInternet = mgr.isOnline(); + } + else { + Q_ASSERT(!mgr.isOnline()); + } + Calamares::JobQueue::instance()->globalStorage()->insert( "hasInternet", hasInternet ); return hasInternet; }