D13104: Protocol: QJsonObject for tracer.

Daniel Vrátil noreply at phabricator.kde.org
Mon May 28 18:10:24 BST 2018


dvratil added inline comments.

INLINE COMMENTS

> knauss wrote in protocol.cpp:207
> this does not work, as the method is not virtual, so in the end we have a CommandPtr in Akonadi::Server::Connection so than we need a logic to static_cast this to the real class. With parent::toJson we end up currently in an endless loop as we satrt in the base class Command::toJson.

Hmm, right. Then at least fix the missing chai-up from `ChangeNotification` to `Command` :)

> knauss wrote in protocol_p.h:158
> what is the advantage of a free operator? as the operator do not match as OJsonObject is a map like object.

Because it's a proper overload. With the current approach the `toJson()` methods in subclasses overshadow/hide the parent class implementations without them being virtual (which we still call however) so that's not too nice.

REPOSITORY
  R165 Akonadi

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

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/20180528/a318b40b/attachment.html>


More information about the kde-pim mailing list