diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index 49daa22ec8d..71e435b7712 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -43,6 +43,10 @@ #include #include +#include +#include + + #ifndef QT_NO_BEARERMANAGEMENT QT_BEGIN_NAMESPACE @@ -375,6 +379,8 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations() updating = false; #ifndef QT_NO_LIBRARY + bool envOK = false; + const int skipGeneric = qgetenv("QT_EXCLUDE_GENERIC_BEARER").toInt(&envOK); QBearerEngine *generic = 0; QFactoryLoader *l = loader(); const PluginKeyMap keyMap = l->keyMap(); @@ -409,8 +415,10 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations() } } - if (generic) - sessionEngines.append(generic); + if (generic) { + if (!envOK || skipGeneric <= 0) + sessionEngines.append(generic); + } #endif // QT_NO_LIBRARY }