NOISSUE make travis.ci shut up about fancy QJsonObject initialization in Wonko parser
This commit is contained in:
parent
b6d455a02b
commit
aa4842a91d
@ -57,14 +57,16 @@ static void serializeCommonVersion(const WonkoVersion *version, QJsonObject &obj
|
|||||||
{
|
{
|
||||||
if (ref.version().isEmpty())
|
if (ref.version().isEmpty())
|
||||||
{
|
{
|
||||||
requires.append(QJsonObject({{"uid", ref.uid()}}));
|
QJsonObject out;
|
||||||
|
out["uid"] = ref.uid();
|
||||||
|
requires.append(out);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
requires.append(QJsonObject({
|
QJsonObject out;
|
||||||
{"uid", ref.uid()},
|
out["uid"] = ref.uid();
|
||||||
{"version", ref.version()}
|
out["version"] = ref.version();
|
||||||
}));
|
requires.append(out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,15 +119,15 @@ QJsonObject WonkoFormatV1::serializeIndexInternal(const WonkoIndex *ptr) const
|
|||||||
QJsonArray index;
|
QJsonArray index;
|
||||||
for (const WonkoVersionListPtr &list : ptr->lists())
|
for (const WonkoVersionListPtr &list : ptr->lists())
|
||||||
{
|
{
|
||||||
index.append(QJsonObject({
|
QJsonObject out;
|
||||||
{"uid", list->uid()},
|
out["uid"] = list->uid();
|
||||||
{"name", list->name()}
|
out["version"] = list->name();
|
||||||
}));
|
index.append(out);
|
||||||
}
|
}
|
||||||
return QJsonObject({
|
QJsonObject out;
|
||||||
{"formatVersion", 1},
|
out["formatVersion"] = 1;
|
||||||
{"index", index}
|
out["index"] = index;
|
||||||
});
|
return out;
|
||||||
}
|
}
|
||||||
QJsonObject WonkoFormatV1::serializeVersionInternal(const WonkoVersion *ptr) const
|
QJsonObject WonkoFormatV1::serializeVersionInternal(const WonkoVersion *ptr) const
|
||||||
{
|
{
|
||||||
@ -147,10 +149,10 @@ QJsonObject WonkoFormatV1::serializeVersionListInternal(const WonkoVersionList *
|
|||||||
serializeCommonVersion(version.get(), obj);
|
serializeCommonVersion(version.get(), obj);
|
||||||
versions.append(obj);
|
versions.append(obj);
|
||||||
}
|
}
|
||||||
return QJsonObject({
|
QJsonObject out;
|
||||||
{"formatVersion", 10},
|
out["formatVersion"] = 10;
|
||||||
{"uid", ptr->uid()},
|
out["uid"] = ptr->uid();
|
||||||
{"name", ptr->name().isNull() ? QJsonValue() : ptr->name()},
|
out["name"] = ptr->name().isNull() ? QJsonValue() : ptr->name();
|
||||||
{"versions", versions}
|
out["versions"] = versions;
|
||||||
});
|
return out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user