[welcome] revert 56b21bb
This commit is contained in:
parent
56b21bbb20
commit
88b33d3830
@ -36,9 +36,7 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QNetworkConfigurationManager>
|
#include <QNetworkAccessManager>
|
||||||
#include <QNetworkConfiguration>
|
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
@ -339,20 +337,8 @@ RequirementsChecker::checkHasPower()
|
|||||||
bool
|
bool
|
||||||
RequirementsChecker::checkHasInternet()
|
RequirementsChecker::checkHasInternet()
|
||||||
{
|
{
|
||||||
// doc from: https://doc.qt.io/qt-5/qnetworkconfigurationmanager.html#isOnline
|
// default to true in the QNetworkAccessManager::UnknownAccessibility case
|
||||||
bool hasInternet = false;
|
bool hasInternet = QNetworkAccessManager(this).networkAccessible() != QNetworkAccessManager::NotAccessible;
|
||||||
|
|
||||||
QNetworkConfigurationManager mgr;
|
|
||||||
QList<QNetworkConfiguration> 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 );
|
Calamares::JobQueue::instance()->globalStorage()->insert( "hasInternet", hasInternet );
|
||||||
return hasInternet;
|
return hasInternet;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user