Changeset View
Changeset View
Standalone View
Standalone View
src/contacts/contactfetchjob.cpp
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 52 | ContactFetchJob::Private::Private(ContactFetchJob *parent): | |||
---|---|---|---|---|---|
53 | fetchDeleted(true), | 53 | fetchDeleted(true), | ||
54 | timestamp(0), | 54 | timestamp(0), | ||
55 | q(parent) | 55 | q(parent) | ||
56 | { | 56 | { | ||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | QNetworkRequest ContactFetchJob::Private::createRequest(const QUrl& url) | 59 | QNetworkRequest ContactFetchJob::Private::createRequest(const QUrl& url) | ||
60 | { | 60 | { | ||
61 | QNetworkRequest request; | 61 | QNetworkRequest request(url); | ||
62 | request.setRawHeader("Authorization", "Bearer " + q->account()->accessToken().toLatin1()); | | |||
63 | request.setRawHeader("GData-Version", ContactsService::APIVersion().toLatin1()); | 62 | request.setRawHeader("GData-Version", ContactsService::APIVersion().toLatin1()); | ||
64 | request.setUrl(url); | | |||
65 | 63 | | |||
66 | QStringList headers; | 64 | QStringList headers; | ||
67 | auto rawHeaderList = request.rawHeaderList(); | 65 | auto rawHeaderList = request.rawHeaderList(); | ||
68 | headers.reserve(rawHeaderList.size()); | 66 | headers.reserve(rawHeaderList.size()); | ||
69 | for (const QByteArray &str : qAsConst(rawHeaderList)) { | 67 | for (const QByteArray &str : qAsConst(rawHeaderList)) { | ||
70 | headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str)); | 68 | headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str)); | ||
71 | } | 69 | } | ||
72 | 70 | | |||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |