Changeset View
Changeset View
Standalone View
Standalone View
plugins/ghprovider/ghresource.cpp
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 96 | { | |||
---|---|---|---|---|---|
101 | /* And we don't care if it's successful ;) */ | 101 | /* And we don't care if it's successful ;) */ | ||
102 | job->start(); | 102 | job->start(); | ||
103 | } | 103 | } | ||
104 | 104 | | |||
105 | KIO::TransferJob * Resource::getTransferJob(const QString &uri, const QString &token) const | 105 | KIO::TransferJob * Resource::getTransferJob(const QString &uri, const QString &token) const | ||
106 | { | 106 | { | ||
107 | QUrl url = baseUrl; | 107 | QUrl url = baseUrl; | ||
108 | url = url.adjusted(QUrl::StripTrailingSlash); | 108 | url = url.adjusted(QUrl::StripTrailingSlash); | ||
109 | url.setPath(url.path() + '/' + uri); | 109 | url.setPath(url.path() + uri); | ||
110 | KIO::TransferJob *job = KIO::get(url, KIO::Reload, KIO::HideProgressInfo); | 110 | KIO::TransferJob *job = KIO::get(url, KIO::Reload, KIO::HideProgressInfo); | ||
111 | if (!token.isEmpty()) | 111 | if (!token.isEmpty()) | ||
112 | job->addMetaData(QStringLiteral("customHTTPHeader"), "Authorization: token " + token); | 112 | job->addMetaData(QStringLiteral("customHTTPHeader"), "Authorization: token " + token); | ||
113 | return job; | 113 | return job; | ||
114 | } | 114 | } | ||
115 | 115 | | |||
116 | void Resource::retrieveRepos(const QByteArray &data) | 116 | void Resource::retrieveRepos(const QByteArray &data) | ||
117 | { | 117 | { | ||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |