diff options
| author | Juha Vuolle <juha.vuolle@qt.io> | 2024-09-13 16:04:35 +0300 |
|---|---|---|
| committer | Juha Vuolle <juha.vuolle@qt.io> | 2024-09-16 14:17:59 +0300 |
| commit | ce42fd407c8e426e11bbdd9447a38ce060a52ff8 (patch) | |
| tree | 6b047ccd6d75ec150d3439b22c60b2e7f74e0006 /src/oauth/qoauth2authorizationcodeflow.cpp | |
| parent | 4f930ef4058e43de818d0b51095da177d8227a59 (diff) | |
Unshadow a member variable
The local variable 'grantedScope' shadows same-name variable
in QAbstractOAuth2Private. Doesn't cause active harm at the
moment, but can lead to confusion later.
Amends: 571b71763c0485778623139359acc88985099efb
Change-Id: Ida92d42e8a5f0ff5ff30d18eabd60190cd4a9153
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/oauth/qoauth2authorizationcodeflow.cpp')
| -rw-r--r-- | src/oauth/qoauth2authorizationcodeflow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/oauth/qoauth2authorizationcodeflow.cpp b/src/oauth/qoauth2authorizationcodeflow.cpp index 297d125..bc5fef4 100644 --- a/src/oauth/qoauth2authorizationcodeflow.cpp +++ b/src/oauth/qoauth2authorizationcodeflow.cpp @@ -167,15 +167,15 @@ void QOAuth2AuthorizationCodeFlowPrivate::_q_accessTokenRequestFinished(const QV // // Note: 'scope' variable has two roles: requested scope, and later granted scope. // Therefore 'scope' needs to be set if the granted scope differs from 'scope'. - const QString grantedScope = values.value(Key::scope).toString(); - const QStringList splitGrantedScope = grantedScope.split(" "_L1, Qt::SkipEmptyParts); + const QString receivedGrantedScope = values.value(Key::scope).toString(); + const QStringList splitGrantedScope = receivedGrantedScope.split(" "_L1, Qt::SkipEmptyParts); if (splitGrantedScope.isEmpty()) { setGrantedScope(requestedScope); } else { setGrantedScope(splitGrantedScope); #if QT_DEPRECATED_SINCE(6, 11) - if (grantedScope != scope) { - scope = grantedScope; + if (receivedGrantedScope != scope) { + scope = receivedGrantedScope; QT_IGNORE_DEPRECATIONS(Q_EMIT q->scopeChanged(scope);) } #endif |
