Changeset View
Changeset View
Standalone View
Standalone View
src/drive/appfetchjob.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
56 | 56 | | |||
57 | AppFetchJob::~AppFetchJob() | 57 | AppFetchJob::~AppFetchJob() | ||
58 | { | 58 | { | ||
59 | delete d; | 59 | delete d; | ||
60 | } | 60 | } | ||
61 | 61 | | |||
62 | void AppFetchJob::start() | 62 | void AppFetchJob::start() | ||
63 | { | 63 | { | ||
64 | QNetworkRequest request; | 64 | QUrl url; | ||
65 | if (d->appId.isEmpty()) { | 65 | if (d->appId.isEmpty()) { | ||
66 | request.setUrl(DriveService::fetchAppsUrl()); | 66 | url = DriveService::fetchAppsUrl(); | ||
67 | } else { | 67 | } else { | ||
68 | request.setUrl(DriveService::fetchAppUrl(d->appId)); | 68 | url = DriveService::fetchAppUrl(d->appId); | ||
69 | } | 69 | } | ||
70 | request.setRawHeader("Authorization", "Bearer " + account()->accessToken().toLatin1()); | 70 | QNetworkRequest request(url); | ||
71 | 71 | | |||
72 | enqueueRequest(request); | 72 | enqueueRequest(request); | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | ObjectsList AppFetchJob::handleReplyWithItems(const QNetworkReply *reply, | 75 | ObjectsList AppFetchJob::handleReplyWithItems(const QNetworkReply *reply, | ||
76 | const QByteArray &rawData) | 76 | const QByteArray &rawData) | ||
77 | { | 77 | { | ||
78 | ObjectsList items; | 78 | ObjectsList items; | ||
Show All 19 Lines |