Changeset View
Changeset View
Standalone View
Standalone View
src/drive/revisionfetchjob.cpp
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | |||||
61 | 61 | | |||
62 | RevisionFetchJob::~RevisionFetchJob() | 62 | RevisionFetchJob::~RevisionFetchJob() | ||
63 | { | 63 | { | ||
64 | delete d; | 64 | delete d; | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | void RevisionFetchJob::start() | 67 | void RevisionFetchJob::start() | ||
68 | { | 68 | { | ||
69 | QNetworkRequest request; | 69 | QUrl url; | ||
70 | if (d->revisionId.isEmpty()) { | 70 | if (d->revisionId.isEmpty()) { | ||
71 | request.setUrl(DriveService::fetchRevisionsUrl(d->fileId)); | 71 | url = DriveService::fetchRevisionsUrl(d->fileId); | ||
72 | } else { | 72 | } else { | ||
73 | request.setUrl(DriveService::fetchRevisionUrl(d->fileId, d->revisionId)); | 73 | url = DriveService::fetchRevisionUrl(d->fileId, d->revisionId); | ||
74 | } | 74 | } | ||
75 | request.setRawHeader("Authorization", "Bearer " + account()->accessToken().toLatin1()); | 75 | QNetworkRequest request(url); | ||
76 | 76 | | |||
77 | enqueueRequest(request); | 77 | enqueueRequest(request); | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | ObjectsList RevisionFetchJob::handleReplyWithItems(const QNetworkReply *reply, | 80 | ObjectsList RevisionFetchJob::handleReplyWithItems(const QNetworkReply *reply, | ||
81 | const QByteArray &rawData) | 81 | const QByteArray &rawData) | ||
82 | { | 82 | { | ||
83 | ObjectsList items; | 83 | ObjectsList items; | ||
Show All 19 Lines |