diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2019-11-25 16:07:12 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2019-11-25 17:23:12 +0300 |
commit | 3d8883c97a4c428a3f600ac0c2f265771c1bdb4c (patch) | |
tree | 5c085d5e3ccdd04602f3d47e37faa5f28e9531a6 /src/gui/creds | |
parent | 041b6008b68949b9bc09fe0be0e21934c1a68610 (diff) |
Fix build with Qt<5.13
Diffstat (limited to 'src/gui/creds')
-rw-r--r-- | src/gui/creds/oauth.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/creds/oauth.cpp b/src/gui/creds/oauth.cpp index 44cd3bb1e..cacfcaad6 100644 --- a/src/gui/creds/oauth.cpp +++ b/src/gui/creds/oauth.cpp @@ -100,12 +100,12 @@ void OAuth::start() req.setAttribute(HttpCredentials::DontAddCredentialsAttribute, true); auto requestBody = new QBuffer; - QUrlQuery arguments { - { "grant_type", "authorization_code" }, - { "code" , code }, - { "redirect_uri", QString("http://localhost:%1").arg(_server.serverPort()) }, - { "code_verifier", _pkceCodeVerifier }, - { "scope", "openid offline_access" }}; + QUrlQuery arguments; + arguments.setQueryItems({ { QStringLiteral("grant_type"), "authorization_code" }, + { QStringLiteral("code"), code }, + { QStringLiteral("redirect_uri"), QStringLiteral("http://localhost:%1").arg(_server.serverPort()) }, + { QStringLiteral("code_verifier"), _pkceCodeVerifier }, + { QStringLiteral("scope"), QStringLiteral("openid offline_access") } }); requestBody->setData(arguments.query(QUrl::FullyEncoded).toLatin1()); auto job = _account->sendRequest("POST", requestToken, req, requestBody); job->setTimeout(qMin(30 * 1000ll, job->timeoutMsec())); |