Avoid loading multiple bearer plugins of the same key
There may be duplicated debug plugins, loading both will cause crash. Change-Id: Icc2a3643c318844bc7f2e149a6434e95de2449b2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
e8aa56b74b
commit
fe40b8f4ad
@ -383,8 +383,13 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations()
|
||||
QFactoryLoader *l = loader();
|
||||
const PluginKeyMap keyMap = l->keyMap();
|
||||
const PluginKeyMapConstIterator cend = keyMap.constEnd();
|
||||
QStringList addedEngines;
|
||||
for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend; ++it) {
|
||||
const QString &key = it.value();
|
||||
if (addedEngines.contains(key))
|
||||
continue;
|
||||
|
||||
addedEngines.append(key);
|
||||
if (QBearerEngine *engine = qLoadPlugin<QBearerEngine, QBearerEnginePlugin>(l, key)) {
|
||||
if (key == QLatin1String("generic"))
|
||||
generic = engine;
|
||||
|
Loading…
Reference in New Issue
Block a user