summaryrefslogtreecommitdiffstats
path: root/src/oauth/qoauth2deviceauthorizationflow.cpp
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@qt.io>2024-12-19 10:35:43 +0200
committerJuha Vuolle <juha.vuolle@qt.io>2024-12-19 13:16:08 +0200
commit97a5b4c4b9816d719c90ee015c2a8e62c9f94c63 (patch)
tree21cb04aebbb2141378f0a8dc48e2edea1d0737b5 /src/oauth/qoauth2deviceauthorizationflow.cpp
parent14dd62b48c28805678183e005806bb86207920c4 (diff)
Rename isPolling property to polling
To comply with API naming guideline. In this context the 'polling' can be considered an adjective/state, and the getter is prefixed with 'is', while the name of the property (and its change signal) is not prefixed. https://wiki.qt.io/API_Design_Principles See Naming Boolean Getters, Setters, and Properties Resulted from API review. Amends: 164e2d897fb7c3a60b518985774a4faa360ba2c9 Pick-to: 6.9 Change-Id: Iaf190edaf735ea32ca0ad66fe00a77a57bb037b4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/oauth/qoauth2deviceauthorizationflow.cpp')
-rw-r--r--src/oauth/qoauth2deviceauthorizationflow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/oauth/qoauth2deviceauthorizationflow.cpp b/src/oauth/qoauth2deviceauthorizationflow.cpp
index 6873c62..0c2f42a 100644
--- a/src/oauth/qoauth2deviceauthorizationflow.cpp
+++ b/src/oauth/qoauth2deviceauthorizationflow.cpp
@@ -121,7 +121,7 @@ using Stage = QAbstractOAuth::Stage;
*/
/*!
- \property QOAuth2DeviceAuthorizationFlow::isPolling
+ \property QOAuth2DeviceAuthorizationFlow::polling
This property holds whether or not the flow is actively polling
for tokens.
@@ -404,7 +404,7 @@ bool QOAuth2DeviceAuthorizationFlowPrivate::startTokenPolling()
qCDebug(loggingCategory) << "Token stage: starting polling with interval:"
<< std::chrono::duration_cast<std::chrono::milliseconds>(tokenPollingTimer.interval());
tokenPollingTimer.start();
- emit q->isPollingChanged(true);
+ emit q->pollingChanged(true);
return true;
}
@@ -417,7 +417,7 @@ void QOAuth2DeviceAuthorizationFlowPrivate::stopTokenPolling()
qCDebug(loggingCategory, "Token stage: Stopping token polling");
resetCurrentTokenReply();
tokenPollingTimer.stop();
- emit q->isPollingChanged(false);
+ emit q->pollingChanged(false);
}
void QOAuth2DeviceAuthorizationFlowPrivate::pollTokens()
@@ -490,7 +490,7 @@ void QOAuth2DeviceAuthorizationFlowPrivate::reset()
deviceCode.clear();
if (q->isPolling()) {
tokenPollingTimer.stop();
- emit q->isPollingChanged(false);
+ emit q->pollingChanged(false);
}
tokenPollingTimer.setInterval(defaultPollingInterval);
setStatus(Status::NotAuthenticated);
@@ -652,7 +652,7 @@ QDateTime QOAuth2DeviceAuthorizationFlow::userCodeExpirationAt() const
Calling this function will reset any previous authorization data.
\sa authorizeWithUserCode(), granted(), QAbstractOAuth::requestFailed(),
- isPolling, startTokenPolling(), stopTokenPolling(), {Device Flow Usage}
+ polling, startTokenPolling(), stopTokenPolling(), {Device Flow Usage}
*/
void QOAuth2DeviceAuthorizationFlow::grant()
{
@@ -790,7 +790,7 @@ void QOAuth2DeviceAuthorizationFlow::refreshTokens()
typically 5 seconds. First poll request is sent once the first interval
has elapsed.
- \sa isPolling, stopTokenPolling(), {Device Flow Usage}
+ \sa polling, stopTokenPolling(), {Device Flow Usage}
*/
bool QOAuth2DeviceAuthorizationFlow::startTokenPolling()
{
@@ -802,7 +802,7 @@ bool QOAuth2DeviceAuthorizationFlow::startTokenPolling()
Stops token polling. Any potential outstanding poll requests
are silently discarded.
- \sa isPolling, startTokenPolling()
+ \sa polling, startTokenPolling()
*/
void QOAuth2DeviceAuthorizationFlow::stopTokenPolling()
{