D28178: [contacts] Fix ContactCreateJob with a photo
Daniel Vrátil
noreply at phabricator.kde.org
Sat Mar 21 12:23:30 GMT 2020
dvratil requested changes to this revision.
dvratil added a comment.
This revision now requires changes to proceed.
Looks good, thanks. Just a small thing, same as in the other review - move the code to a dedicated function please.
INLINE COMMENTS
> contactcreatejob.cpp:142-154
> + ContactPtr contact = d->contacts.current();
> + if (!contact->photo().isEmpty()) {
> + const QUrl url = ContactsService::photoUrl(account()->accountName(), d->lastContact->uid());
> + QNetworkRequest photoRequest(url);
> + photoRequest.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("image/*"));
> + d->pendingPhoto.first = contact->photo().rawData();
> + d->pendingPhoto.second = contact->photo().type();
Please the code to a dedicated function, please.
REPOSITORY
R477 KGAPI Library
REVISION DETAIL
https://phabricator.kde.org/D28178
To: poboiko, dvratil
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200321/39f35346/attachment-0001.html>
More information about the kde-pim
mailing list