diff --git a/GPClient/gpclient.cpp b/GPClient/gpclient.cpp index a5b81d7..2fd34e3 100644 --- a/GPClient/gpclient.cpp +++ b/GPClient/gpclient.cpp @@ -74,14 +74,12 @@ void GPClient::on_connectButton_clicked() void GPClient::preloginResultFinished() { if (reply->error()) { - qDebug() << "Prelogin request error"; + qWarning() << "Prelogin request error"; emit connectFailed(); return; } QByteArray bytes = reply->readAll(); - qDebug("response is: %s", bytes.toStdString().c_str()); - const QString tagMethod = "saml-auth-method"; const QString tagRequest = "saml-request"; QString samlMethod; @@ -100,7 +98,7 @@ void GPClient::preloginResultFinished() } if (samlMethod == nullptr || samlRequest == nullptr) { - qDebug("This does not appear to be a SAML prelogin response ( or tags missing)"); + qWarning("This does not appear to be a SAML prelogin response ( or tags missing)"); emit connectFailed(); return; } @@ -110,15 +108,12 @@ void GPClient::preloginResultFinished() qDebug("TODO: SAML method is POST"); emit connectFailed(); } else if (samlMethod == "REDIRECT") { - qInfo() << "Request URL is: %s" << samlRequest; samlLogin(samlRequest); } } void GPClient::onLoginSuccess(QJsonObject loginResult) { - qDebug() << "Login success:" << loginResult; - QString fullpath = "/ssl-vpn/login.esp"; QString shortpath = "gateway"; QString user = loginResult.value("saml-username").toString(); @@ -166,18 +161,16 @@ void GPClient::onVPNConnected() void GPClient::onVPNDisconnected() { - qDebug("========= disconnected"); updateConnectionStatus("not_connected"); } void GPClient::onVPNLogAvailable(QString log) { - qDebug() << log; + qInfo() << log; } void GPClient::initVpnStatus() { int status = vpn->status(); - qDebug() << "VPN status:" << status; if (status == 1) { ui->statusLabel->setText("Connecting..."); updateConnectionStatus("pending"); @@ -214,8 +207,6 @@ void GPClient::moveCenter() void GPClient::doAuth(const QString portal) { const QString preloginUrl = "https://" + portal + "/ssl-vpn/prelogin.esp"; - qDebug("%s", preloginUrl.toStdString().c_str()); - reply = networkManager->post(QNetworkRequest(preloginUrl), (QByteArray) nullptr); connect(reply, &QNetworkReply::finished, this, &GPClient::preloginResultFinished); } diff --git a/GPClient/main.cpp b/GPClient/main.cpp index e397858..a30aee4 100644 --- a/GPClient/main.cpp +++ b/GPClient/main.cpp @@ -1,5 +1,6 @@ #include "singleapplication.h" #include "gpclient.h" +#include "enhancedwebview.h" int main(int argc, char *argv[]) { diff --git a/GPService/gpservice.cpp b/GPService/gpservice.cpp index 2beb967..8a38fe8 100644 --- a/GPService/gpservice.cpp +++ b/GPService/gpservice.cpp @@ -130,6 +130,6 @@ void GPService::onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus) void GPService::log(QString msg) { - qDebug() << msg; + qInfo() << msg; emit logAvailable(msg); }