Don't reject plugins that have empty meta-data
Having an empty Json object ({}) should be valid meta-data but this check means that there needs to be at least one key-value pair or the plugin will be rejected. Change-Id: I578ccc35016af16fd30b3807e796fa63c0282f30 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
d823646db3
commit
7f67d0810e
@ -175,8 +175,7 @@ void QFactoryLoader::update()
|
|||||||
QString iid = library->metaData.value(QLatin1String("IID")).toString();
|
QString iid = library->metaData.value(QLatin1String("IID")).toString();
|
||||||
if (iid == QLatin1String(d->iid.constData(), d->iid.size())) {
|
if (iid == QLatin1String(d->iid.constData(), d->iid.size())) {
|
||||||
QJsonObject object = library->metaData.value(QLatin1String("MetaData")).toObject();
|
QJsonObject object = library->metaData.value(QLatin1String("MetaData")).toObject();
|
||||||
if (!object.isEmpty())
|
metaDataOk = true;
|
||||||
metaDataOk = true;
|
|
||||||
|
|
||||||
QJsonArray k = object.value(QLatin1String("Keys")).toArray();
|
QJsonArray k = object.value(QLatin1String("Keys")).toArray();
|
||||||
for (int i = 0; i < k.size(); ++i) {
|
for (int i = 0; i < k.size(); ++i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user