From ba4b28cc00b405c66e5a0259ec3136a8fcd87a4e Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 23 Oct 2024 15:18:10 +0200 Subject: [PATCH] improve logs when checking terms of service status should help diagnosing a client stuck with ToS block while thinking they had been accepted Signed-off-by: Matthieu Gallien --- src/gui/connectionvalidator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/connectionvalidator.cpp b/src/gui/connectionvalidator.cpp index c5ed581db05b..75cb21762fcb 100644 --- a/src/gui/connectionvalidator.cpp +++ b/src/gui/connectionvalidator.cpp @@ -378,25 +378,29 @@ void TermsOfServiceChecker::start() void TermsOfServiceChecker::slotServerTermsOfServiceRecieved(const QJsonDocument &reply) { - qCDebug(lcConnectionValidator) << "Terms of service status" << reply; + qCInfo(lcConnectionValidator) << "Terms of service status" << reply; if (reply.object().contains("ocs")) { const auto needToSign = !reply.object().value("ocs").toObject().value("data").toObject().value("hasSigned").toBool(false); if (needToSign != _needToSign) { + qCInfo(lcConnectionValidator) << "_needToSign" << (_needToSign ? "need to sign" : "no need to sign"); _needToSign = needToSign; emit needToSignChanged(); } } else if (_needToSign) { _needToSign = false; + qCInfo(lcConnectionValidator) << "_needToSign" << (_needToSign ? "need to sign" : "no need to sign"); emit needToSignChanged(); } + qCInfo(lcConnectionValidator) << "done"; emit done(); } void TermsOfServiceChecker::checkServerTermsOfService() { if (!_account) { + qCInfo(lcConnectionValidator) << "done"; emit done(); }