D19403: Add Team Drive model and basic fetch.

Daniel Vrátil noreply at phabricator.kde.org
Thu Feb 28 10:49:32 GMT 2019


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


  Nice, thanks for the patch!
  
  I haven't checked the code in-depth (I don't know if I'll get to it before the weekend, sorry), but one thing that I noticed: please update year and your name in the copyright headers :)
  
  Second thing: I realized when I was fixing a bug in kgapi recently that having all the properties as strings everywhere (e.g. `QStringLiteral("fooPropertyName")` is annoying) - it's hard to read and easy to make a typo in. Could you please define all the strings that are used as JSON property names and URL queries as named constants in an anonymous namespace at the top of the file, e.g. for TeamDrive:
  
    namespace {
    static const QString tdId = QStringLiteral("id");
    static const QString tdName = QStringLiteral("name");
    ...
    }
  
  Same for URL query parameters in jobs, e.g. `static const QString queryMaxResults = QStringLiteral("maxResults");`
  
  I will eventually get around to change it everywhere to make the code safer. It will also reduce the size of the binaries since the strings won't be repeated twice there.
  
  Thanks!

REPOSITORY
  R477 KGAPI Library

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

To: barchiesi, dvratil
Cc: kde-pim, #libkgapi, barchiesi, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190228/2532e9a0/attachment.html>


More information about the kde-pim mailing list