D22475: Use metadata.json when creating the metadata from KPackage::metadata()

David Edmundson noreply at phabricator.kde.org
Tue Jul 16 01:14:17 BST 2019


davidedmundson added a comment.


  That was less than 5 hours from posting to give up on a review!
  
  We're not in a rush.

INLINE COMMENTS

> package.cpp:52
> +{
> +    static QSet<QByteArray> blacklist = {"metadata", "metadatajson"};
> +    return blacklist.contains(name);

that's a whitelist

> package.cpp:64
>          addFileDefinition("metadata", QStringLiteral("metadata.desktop"), i18n("Desktop file that describes this package."));
> +        addFileDefinition("metadatajson", QStringLiteral("metadata.json"), i18n("JSON file that describes this package."));
>      }

According to the docs

> Starting in 4.6, if an entry with the given key already exists, the path is added to it as a search alternative.

so we can also search for metadata.json without changing the key. which will then work for all other code that uses "metadata" as a key.

REPOSITORY
  R290 KPackage

REVISION DETAIL
  https://phabricator.kde.org/D22475

To: apol, #frameworks
Cc: davidedmundson, kde-frameworks-devel, LeGast00n, sbergeron, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190716/3813ce4c/attachment.html>


More information about the Kde-frameworks-devel mailing list