Commit 4f337965 authored by Timur Pocheptsov's avatar Timur Pocheptsov
Browse files

Add an option to skip the generic bearer engine


Add an option to skip a generic bearer engine if needed (by testing
environment variable QT_EXCLUDE_GENERIC_BEARER).

Task-number: QTBUG-41866
Change-Id: I1b53ed1d22a7b34de5c6f6d0386ed242b2ca5e00
Reviewed-by: default avatarAlex Blasche <alexander.blasche@theqtcompany.com>
parent 0829baf9
Branches
Tags
No related merge requests found
Showing with 10 additions and 2 deletions
......@@ -43,6 +43,10 @@
#include <QtCore/private/qcoreapplication_p.h>
#include <QtCore/private/qthread_p.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qglobal.h>
#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
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment