Changeset View
Changeset View
Standalone View
Standalone View
src/drive/permissiondeletejob.cpp
Show All 18 Lines | |||||
19 | * You should have received a copy of the GNU Lesser General Public | 19 | * You should have received a copy of the GNU Lesser General Public | ||
20 | * License along with this library. If not, see <https://www.gnu.org/licenses/>. | 20 | * License along with this library. If not, see <https://www.gnu.org/licenses/>. | ||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | 23 | | |||
24 | #include "permissiondeletejob.h" | 24 | #include "permissiondeletejob.h" | ||
25 | #include "permission.h" | 25 | #include "permission.h" | ||
26 | #include "account.h" | 26 | #include "account.h" | ||
27 | #include "utils.h" | ||||
27 | #include "driveservice.h" | 28 | #include "driveservice.h" | ||
28 | 29 | | |||
29 | #include <QNetworkRequest> | 30 | #include <QNetworkRequest> | ||
30 | #include <QUrlQuery> | 31 | #include <QUrlQuery> | ||
31 | 32 | | |||
32 | using namespace KGAPI2; | 33 | using namespace KGAPI2; | ||
33 | using namespace KGAPI2::Drive; | 34 | using namespace KGAPI2::Drive; | ||
34 | 35 | | |||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 110 | { | |||
110 | if (d->permissionsIds.isEmpty()) { | 111 | if (d->permissionsIds.isEmpty()) { | ||
111 | emitFinished(); | 112 | emitFinished(); | ||
112 | return; | 113 | return; | ||
113 | } | 114 | } | ||
114 | 115 | | |||
115 | const QString permissionId = d->permissionsIds.takeFirst(); | 116 | const QString permissionId = d->permissionsIds.takeFirst(); | ||
116 | QUrl url = DriveService::deletePermissionUrl(d->fileId, permissionId); | 117 | QUrl url = DriveService::deletePermissionUrl(d->fileId, permissionId); | ||
117 | QUrlQuery withDriveSupportQuery(url); | 118 | QUrlQuery withDriveSupportQuery(url); | ||
118 | withDriveSupportQuery.addQueryItem(QStringLiteral("supportsAllDrives"), d->supportsAllDrives ? QStringLiteral("true") : QStringLiteral("false")); | 119 | withDriveSupportQuery.addQueryItem(QStringLiteral("supportsAllDrives"), Utils::bool2Str(d->supportsAllDrives)); | ||
119 | url.setQuery(withDriveSupportQuery); | 120 | url.setQuery(withDriveSupportQuery); | ||
120 | QNetworkRequest request(url); | 121 | QNetworkRequest request(url); | ||
121 | 122 | | |||
122 | enqueueRequest(request); | 123 | enqueueRequest(request); | ||
123 | } | 124 | } | ||
124 | 125 | | |||
125 | 126 | |