Use placeholder values for PluginMeta

This commit is contained in:
Mm2PL 2023-02-01 01:19:15 +01:00
parent d270192b97
commit 2d76f3588f
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9

View file

@ -39,9 +39,10 @@ struct PluginMeta {
explicit PluginMeta(const QJsonObject &obj) explicit PluginMeta(const QJsonObject &obj)
: name(obj.value("name").toString("A Plugin with no name")) : name(obj.value("name").toString("A Plugin with no name"))
, description(obj.value("description").toString()) , description(obj.value("description").toString("Nothing here"))
, authors(obj.value("authors").toString()) , authors(
, homepage(obj.value("homepage").toString()) obj.value("authors").toString("[please tell me who made this]"))
, homepage(obj.value("homepage").toString("[https://example.com]"))
, license(obj.value("license").toString("[unknown]")) , license(obj.value("license").toString("[unknown]"))
{ {
@ -54,7 +55,7 @@ struct PluginMeta {
else else
{ {
this->version = semver::version(0, 0, 0); this->version = semver::version(0, 0, 0);
description.append("\nWarning: invalid version"); description.append("\nWarning: invalid version. Use semver.");
} }
for (const auto &t : obj.value("tags").toArray()) for (const auto &t : obj.value("tags").toArray())
{ {