Changeset View
Changeset View
Standalone View
Standalone View
src/calendar/eventfetchjob.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 54 | EventFetchJob::Private::Private(EventFetchJob* parent): | |||
---|---|---|---|---|---|
57 | timeMin(0), | 57 | timeMin(0), | ||
58 | timeMax(0), | 58 | timeMax(0), | ||
59 | q(parent) | 59 | q(parent) | ||
60 | { | 60 | { | ||
61 | } | 61 | } | ||
62 | 62 | | |||
63 | QNetworkRequest EventFetchJob::Private::createRequest(const QUrl& url) | 63 | QNetworkRequest EventFetchJob::Private::createRequest(const QUrl& url) | ||
64 | { | 64 | { | ||
65 | QNetworkRequest request; | 65 | QNetworkRequest request(url); | ||
66 | request.setRawHeader("Authorization", "Bearer " + q->account()->accessToken().toLatin1()); | | |||
67 | request.setRawHeader("GData-Version", CalendarService::APIVersion().toLatin1()); | 66 | request.setRawHeader("GData-Version", CalendarService::APIVersion().toLatin1()); | ||
68 | request.setUrl(url); | | |||
69 | 67 | | |||
70 | QStringList headers; | 68 | QStringList headers; | ||
71 | auto rawHeaderList = request.rawHeaderList(); | 69 | auto rawHeaderList = request.rawHeaderList(); | ||
72 | headers.reserve(rawHeaderList.size()); | 70 | headers.reserve(rawHeaderList.size()); | ||
73 | for (const QByteArray &str : qAsConst(rawHeaderList)) { | 71 | for (const QByteArray &str : qAsConst(rawHeaderList)) { | ||
74 | headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str)); | 72 | headers << QLatin1String(str) + QLatin1String(": ") + QLatin1String(request.rawHeader(str)); | ||
75 | } | 73 | } | ||
76 | 74 | | |||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |