D12736: Add toJson method for the protocol.

Daniel Vrátil noreply at phabricator.kde.org
Sun May 20 13:21:30 BST 2018


dvratil requested changes to this revision.
dvratil added a comment.
This revision now requires changes to proceed.


  Use `!foo.isEmpty()` instead of `foo.size() > 0` please

INLINE COMMENTS

> cppgenerator.cpp:631
> +
> +    for (auto prop : serializeProperties) {
> +        mImpl << "    stream << \"\\\"" << prop->name() << "\\\": \";\n";

`qAsConst(serializeProperties)` to prevent detaching the container

> scope.cpp:329
> +        stream << "\"HRID\": [";
> +        for (const auto &hrid : hridChain()) {
> +            hrid.toJson(stream);

const auto chain = hridChain();
  for (const auto &hrid : chain) {
    ..
  }

to prevent detaching the returned container.

> scope.cpp:332
> +        }
> +        if (hridChain().size() > 0) {
> +            stream.seek(-1);

Use the `chain` variable from above comment here

REPOSITORY
  R165 Akonadi

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

To: knauss, dvratil
Cc: #kde_pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180520/3a3eeacf/attachment.html>


More information about the kde-pim mailing list