chore: use auto to declare variables

This commit is contained in:
Kevin Yue
2022-06-12 16:44:07 +08:00
parent 35266dd8bf
commit 5ebfe9b0f4
3 changed files with 9 additions and 14 deletions

View File

@@ -369,7 +369,8 @@ void GPClient::gatewayLogin()
GatewayAuthenticatorParams params = GatewayAuthenticatorParams::fromPortalConfigResponse(portalConfig);
params.setClientos(settings::get("clientos", "Linux").toString());
GatewayAuthenticator *gatewayAuth = new GatewayAuthenticator(currentGateway().address(), params);
GatewayAuthenticator *gatewayAuth;
gatewayAuth = new GatewayAuthenticator(currentGateway().address(), params);
connect(gatewayAuth, &GatewayAuthenticator::success, [this, gatewayAuth](const QString &authToken) {
this->onGatewaySuccess(authToken);