Changeset View
Changeset View
Standalone View
Standalone View
src/drive/fileabstractmodifyjob.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 54 | { | |||
---|---|---|---|---|---|
55 | if (filesIds.isEmpty()) { | 55 | if (filesIds.isEmpty()) { | ||
56 | q->emitFinished(); | 56 | q->emitFinished(); | ||
57 | return; | 57 | return; | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | const QString fileId = filesIds.takeFirst(); | 60 | const QString fileId = filesIds.takeFirst(); | ||
61 | const QUrl url = q->url(fileId); | 61 | const QUrl url = q->url(fileId); | ||
62 | 62 | | |||
63 | QNetworkRequest request; | 63 | QNetworkRequest request(url); | ||
64 | request.setRawHeader("Authorization", "Bearer " + q->account()->accessToken().toLatin1()); | | |||
65 | request.setHeader(QNetworkRequest::ContentLengthHeader, 0); | 64 | request.setHeader(QNetworkRequest::ContentLengthHeader, 0); | ||
66 | request.setUrl(url); | | |||
67 | 65 | | |||
68 | q->enqueueRequest(request); | 66 | q->enqueueRequest(request); | ||
69 | } | 67 | } | ||
70 | 68 | | |||
71 | FileAbstractModifyJob::FileAbstractModifyJob(const QString &fileId, | 69 | FileAbstractModifyJob::FileAbstractModifyJob(const QString &fileId, | ||
72 | const AccountPtr &account, | 70 | const AccountPtr &account, | ||
73 | QObject *parent): | 71 | QObject *parent): | ||
74 | ModifyJob(account, parent), | 72 | ModifyJob(account, parent), | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |