Static plugins don't break QFactoryLoader::keys()
The = means that a single, static, compat plugin replaces the list of keys (eg. from previously checked static plugins or from dynamic plugins). Using += prevents this undesirable behaviour. Change-Id: I3a40752c08dddbfe81444ca9c782b633e9742ab9 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
d0759e348d
commit
147a38faa6
@ -244,7 +244,7 @@ QStringList QFactoryLoader::keys() const
|
||||
QObject *instance = staticPlugins.at(i).instance();
|
||||
QFactoryInterface *factory = qobject_cast<QFactoryInterface*>(instance);
|
||||
if (instance && factory && instance->qt_metacast(d->iid))
|
||||
keys = factory->keys();
|
||||
keys += factory->keys();
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
|
Loading…
Reference in New Issue
Block a user