Changeset View
Changeset View
Standalone View
Standalone View
src/contacts/contactfetchphotojob.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
55 | { | 55 | { | ||
56 | if (contacts.atEnd()) { | 56 | if (contacts.atEnd()) { | ||
57 | q->emitFinished(); | 57 | q->emitFinished(); | ||
58 | return; | 58 | return; | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | const ContactPtr contact = contacts.current(); | 61 | const ContactPtr contact = contacts.current(); | ||
62 | const QUrl url = ContactsService::photoUrl(q->account()->accountName(), contact->uid()); | 62 | const QUrl url = ContactsService::photoUrl(q->account()->accountName(), contact->uid()); | ||
63 | QNetworkRequest request; | 63 | QNetworkRequest request(url); | ||
64 | request.setUrl(url); | | |||
65 | request.setRawHeader("Authorization", "Bearer " + q->account()->accessToken().toLatin1()); | | |||
66 | request.setRawHeader("GData-Version", ContactsService::APIVersion().toLatin1()); | 64 | request.setRawHeader("GData-Version", ContactsService::APIVersion().toLatin1()); | ||
67 | q->enqueueRequest(request); | 65 | q->enqueueRequest(request); | ||
68 | } | 66 | } | ||
69 | 67 | | |||
70 | 68 | | |||
71 | ContactFetchPhotoJob::ContactFetchPhotoJob(const ContactsList &contacts, const AccountPtr &account, QObject *parent): | 69 | ContactFetchPhotoJob::ContactFetchPhotoJob(const ContactsList &contacts, const AccountPtr &account, QObject *parent): | ||
72 | FetchJob(account, parent), | 70 | FetchJob(account, parent), | ||
73 | d(new Private(this)) | 71 | d(new Private(this)) | ||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |