Populate MetaData:Keys for compat plugins
QFactoryLoader::indexOf() expects the meta-data to contain a Keys entry, if there were any keys. For compat plugins, the result of the plugin's keys() function should be stored here. Change-Id: Ifd04f90cbfce2598d71548c469baa55ca6b0b338 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
36f469bdb1
commit
662c0a722a
@ -168,8 +168,12 @@ void QFactoryLoader::update()
|
||||
if (instance && factory && instance->qt_metacast(d->iid))
|
||||
keys = factory->keys();
|
||||
|
||||
if (!keys.isEmpty())
|
||||
if (!keys.isEmpty()) {
|
||||
metaDataOk = true;
|
||||
QJsonObject object = library->metaData.value(QLatin1String("MetaData")).toObject();
|
||||
object.insert(QLatin1String("Keys"), QJsonArray::fromStringList(keys));
|
||||
library->metaData[QLatin1String("MetaData")] = object;
|
||||
}
|
||||
|
||||
} else {
|
||||
QString iid = library->metaData.value(QLatin1String("IID")).toString();
|
||||
|
Loading…
Reference in New Issue
Block a user