diff options
Diffstat (limited to 'src/plugins/bearer/generic/qgenericengine.cpp')
-rw-r--r-- | src/plugins/bearer/generic/qgenericengine.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp index dfc74f2..d65025b 100644 --- a/src/plugins/bearer/generic/qgenericengine.cpp +++ b/src/plugins/bearer/generic/qgenericengine.cpp @@ -66,6 +66,7 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_NETWORKINTERFACE static QString qGetInterfaceType(const QString &interface) { #ifdef Q_OS_WIN32 @@ -139,6 +140,7 @@ static QString qGetInterfaceType(const QString &interface) return QLatin1String("Unknown"); } +#endif QGenericEngine::QGenericEngine(QObject *parent) : QBearerEngineImpl(parent) @@ -180,6 +182,7 @@ void QGenericEngine::requestUpdate() void QGenericEngine::doRequestUpdate() { +#ifndef QT_NO_NETWORKINTERFACE QMutexLocker locker(&mutex); // Immediately after connecting with a wireless access point @@ -203,7 +206,7 @@ void QGenericEngine::doRequestUpdate() if (interface.flags() & QNetworkInterface::IsLoopBack) continue; - // ignore WLAN interface handled in seperate engine + // ignore WLAN interface handled in separate engine if (qGetInterfaceType(interface.name()) == QLatin1String("WLAN")) continue; @@ -221,8 +224,8 @@ void QGenericEngine::doRequestUpdate() if (name.isEmpty()) name = interface.name(); - QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Discovered; - if (interface.flags() & QNetworkInterface::IsUp) + QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Defined; + if((interface.flags() & QNetworkInterface::IsUp) && !interface.addressEntries().isEmpty()) state |= QNetworkConfiguration::Active; if (accessPointConfigurations.contains(id)) { @@ -290,6 +293,8 @@ void QGenericEngine::doRequestUpdate() } locker.unlock(); +#endif + emit updateCompleted(); } |