Changeset View
Changeset View
Standalone View
Standalone View
src/kpackagetool/kpackagetool.cpp
Show First 20 Lines • Show All 522 Lines • ▼ Show 20 Line(s) | 432 | { | |||
---|---|---|---|---|---|
523 | translateKPluginToAppstream(QStringLiteral("name"), QStringLiteral("Name"), rootObject, writer, false); | 523 | translateKPluginToAppstream(QStringLiteral("name"), QStringLiteral("Name"), rootObject, writer, false); | ||
524 | translateKPluginToAppstream(QStringLiteral("summary"), QStringLiteral("Description"), rootObject, writer, false); | 524 | translateKPluginToAppstream(QStringLiteral("summary"), QStringLiteral("Description"), rootObject, writer, false); | ||
525 | if (!i.website().isEmpty()) { | 525 | if (!i.website().isEmpty()) { | ||
526 | writer.writeStartElement(QStringLiteral("url")); | 526 | writer.writeStartElement(QStringLiteral("url")); | ||
527 | writer.writeAttribute(QStringLiteral("type"), QStringLiteral("homepage")); | 527 | writer.writeAttribute(QStringLiteral("type"), QStringLiteral("homepage")); | ||
528 | writer.writeCharacters(i.website()); | 528 | writer.writeCharacters(i.website()); | ||
529 | writer.writeEndElement(); | 529 | writer.writeEndElement(); | ||
530 | } | 530 | } | ||
531 | | ||||
532 | if (i.pluginId().startsWith(QLatin1String("org.kde."))) { | ||||
533 | writer.writeStartElement(QStringLiteral("url")); | ||||
534 | writer.writeAttribute(QStringLiteral("type"), QStringLiteral("donation")); | ||||
aacid: Not sure if i'm saying crap, but should we check if it already has a donation url and then give… | |||||
This is for the code that turns kpackage metadata files into appdata.xml files. So it doesn't really apply. apol: This is for the code that turns kpackage metadata files into appdata.xml files. So it doesn't… | |||||
535 | writer.writeCharacters(QStringLiteral("https://www.kde.org/donate.php?app=%1").arg(i.pluginId())); | ||||
536 | writer.writeEndElement(); | ||||
537 | } | ||||
538 | | ||||
531 | const auto authors = i.authors(); | 539 | const auto authors = i.authors(); | ||
532 | if (!authors.isEmpty()) { | 540 | if (!authors.isEmpty()) { | ||
533 | QStringList authorsText; | 541 | QStringList authorsText; | ||
534 | for (const auto &author: authors) { | 542 | for (const auto &author: authors) { | ||
535 | authorsText += QStringLiteral("%1 <%2>").arg(author.name(), author.emailAddress()); | 543 | authorsText += QStringLiteral("%1 <%2>").arg(author.name(), author.emailAddress()); | ||
536 | } | 544 | } | ||
537 | writer.writeTextElement(QStringLiteral("developer_name"), authorsText.join(QStringLiteral(", "))); | 545 | writer.writeTextElement(QStringLiteral("developer_name"), authorsText.join(QStringLiteral(", "))); | ||
538 | } | 546 | } | ||
▲ Show 20 Lines • Show All 243 Lines • Show Last 20 Lines |
Not sure if i'm saying crap, but should we check if it already has a donation url and then give a warning or something else?