diff --git a/.vscode/settings.json b/.vscode/settings.json index 90b8e93..fab9481 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,19 @@ "qregularexpressionmatch": "cpp", "qdatetime": "cpp", "qprocess": "cpp", - "qobject": "cpp" + "qobject": "cpp", + "qstandardpaths": "cpp", + "qmainwindow": "cpp", + "qsystemtrayicon": "cpp", + "qpushbutton": "cpp", + "qmenu": "cpp", + "qjsondocument": "cpp", + "qnetworkaccessmanager": "cpp", + "qwebengineview": "cpp", + "qprocessenvironment": "cpp", + "qnetworkreply": "cpp", + "qicon": "cpp", + "qsslsocket": "cpp", + "qapplication": "cpp" } } \ No newline at end of file diff --git a/GPClient/cdpcommand.cpp b/GPClient/cdpcommand.cpp index 10d3f48..0722aac 100644 --- a/GPClient/cdpcommand.cpp +++ b/GPClient/cdpcommand.cpp @@ -1,8 +1,8 @@ -#include "cdpcommand.h" +#include +#include +#include -#include -#include -#include +#include "cdpcommand.h" CDPCommand::CDPCommand(QObject *parent) : QObject(parent) { diff --git a/GPClient/cdpcommand.h b/GPClient/cdpcommand.h index 75cbdbe..8f37b7b 100644 --- a/GPClient/cdpcommand.h +++ b/GPClient/cdpcommand.h @@ -1,7 +1,7 @@ #ifndef CDPCOMMAND_H #define CDPCOMMAND_H -#include +#include class CDPCommand : public QObject { diff --git a/GPClient/cdpcommandmanager.cpp b/GPClient/cdpcommandmanager.cpp index 9969dbd..e4e20f5 100644 --- a/GPClient/cdpcommandmanager.cpp +++ b/GPClient/cdpcommandmanager.cpp @@ -1,7 +1,8 @@ -#include "cdpcommandmanager.h" -#include +#include #include +#include "cdpcommandmanager.h" + CDPCommandManager::CDPCommandManager(QObject *parent) : QObject(parent) , networkManager(new QNetworkAccessManager) diff --git a/GPClient/cdpcommandmanager.h b/GPClient/cdpcommandmanager.h index 9aefedf..ef1238f 100644 --- a/GPClient/cdpcommandmanager.h +++ b/GPClient/cdpcommandmanager.h @@ -1,11 +1,12 @@ #ifndef CDPCOMMANDMANAGER_H #define CDPCOMMANDMANAGER_H +#include +#include +#include +#include + #include "cdpcommand.h" -#include -#include -#include -#include class CDPCommandManager : public QObject { diff --git a/GPClient/enhancedwebview.cpp b/GPClient/enhancedwebview.cpp index 292c6ff..8ac3ac1 100644 --- a/GPClient/enhancedwebview.cpp +++ b/GPClient/enhancedwebview.cpp @@ -1,9 +1,9 @@ +#include +#include + #include "enhancedwebview.h" #include "cdpcommandmanager.h" -#include -#include - EnhancedWebView::EnhancedWebView(QWidget *parent) : QWebEngineView(parent) , cdp(new CDPCommandManager) diff --git a/GPClient/enhancedwebview.h b/GPClient/enhancedwebview.h index 191364d..163768e 100644 --- a/GPClient/enhancedwebview.h +++ b/GPClient/enhancedwebview.h @@ -1,9 +1,10 @@ #ifndef ENHANCEDWEBVIEW_H #define ENHANCEDWEBVIEW_H -#include "cdpcommandmanager.h" #include +#include "cdpcommandmanager.h" + #define ENV_CDP_PORT "QTWEBENGINE_REMOTE_DEBUGGING" class EnhancedWebView : public QWebEngineView diff --git a/GPClient/gatewayauthenticator.cpp b/GPClient/gatewayauthenticator.cpp index 894a4ea..60e98de 100644 --- a/GPClient/gatewayauthenticator.cpp +++ b/GPClient/gatewayauthenticator.cpp @@ -1,11 +1,11 @@ +#include +#include + #include "gatewayauthenticator.h" #include "gphelper.h" #include "loginparams.h" #include "preloginresponse.h" -#include -#include - using namespace gpclient::helper; GatewayAuthenticator::GatewayAuthenticator(const QString& gateway, const GatewayAuthenticatorParams params) diff --git a/GPClient/gatewayauthenticator.h b/GPClient/gatewayauthenticator.h index 97f091c..c150a88 100644 --- a/GPClient/gatewayauthenticator.h +++ b/GPClient/gatewayauthenticator.h @@ -1,10 +1,11 @@ #ifndef GATEWAYAUTHENTICATOR_H #define GATEWAYAUTHENTICATOR_H +#include + #include "normalloginwindow.h" #include "loginparams.h" #include "gatewayauthenticatorparams.h" -#include class GatewayAuthenticator : public QObject { diff --git a/GPClient/gatewayauthenticatorparams.h b/GPClient/gatewayauthenticatorparams.h index cb25eae..72d9176 100644 --- a/GPClient/gatewayauthenticatorparams.h +++ b/GPClient/gatewayauthenticatorparams.h @@ -1,7 +1,8 @@ #ifndef GATEWAYAUTHENTICATORPARAMS_H #define GATEWAYAUTHENTICATORPARAMS_H -#include +#include + #include "portalconfigresponse.h" class GatewayAuthenticatorParams diff --git a/GPClient/gpclient.cpp b/GPClient/gpclient.cpp index 966f4bf..76cfd58 100644 --- a/GPClient/gpclient.cpp +++ b/GPClient/gpclient.cpp @@ -1,3 +1,6 @@ +#include +#include + #include "gpclient.h" #include "gphelper.h" #include "ui_gpclient.h" @@ -6,9 +9,6 @@ #include "settingsdialog.h" #include "gatewayauthenticatorparams.h" -#include -#include - using namespace gpclient::helper; GPClient::GPClient(QWidget *parent) diff --git a/GPClient/gpclient.h b/GPClient/gpclient.h index b1518e3..690c026 100644 --- a/GPClient/gpclient.h +++ b/GPClient/gpclient.h @@ -1,15 +1,15 @@ #ifndef GPCLIENT_H #define GPCLIENT_H +#include +#include +#include +#include + #include "gpserviceinterface.h" #include "portalconfigresponse.h" #include "settingsdialog.h" -#include -#include -#include -#include - QT_BEGIN_NAMESPACE namespace Ui { class GPClient; } QT_END_NAMESPACE diff --git a/GPClient/gpgateway.cpp b/GPClient/gpgateway.cpp index 5725925..7b587ed 100644 --- a/GPClient/gpgateway.cpp +++ b/GPClient/gpgateway.cpp @@ -1,8 +1,8 @@ -#include "gpgateway.h" +#include +#include +#include -#include -#include -#include +#include "gpgateway.h" GPGateway::GPGateway() { diff --git a/GPClient/gpgateway.h b/GPClient/gpgateway.h index 0bfb449..d879259 100644 --- a/GPClient/gpgateway.h +++ b/GPClient/gpgateway.h @@ -1,9 +1,9 @@ #ifndef GPGATEWAY_H #define GPGATEWAY_H -#include -#include -#include +#include +#include +#include class GPGateway { diff --git a/GPClient/gphelper.cpp b/GPClient/gphelper.cpp index 4b6b5bd..242992b 100644 --- a/GPClient/gphelper.cpp +++ b/GPClient/gphelper.cpp @@ -1,14 +1,15 @@ -#include "gphelper.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include "gphelper.h" + QNetworkAccessManager* gpclient::helper::networkManager = new QNetworkAccessManager; QNetworkReply* gpclient::helper::createRequest(QString url, QByteArray params) diff --git a/GPClient/gphelper.h b/GPClient/gphelper.h index 66aa63a..fb74899 100644 --- a/GPClient/gphelper.h +++ b/GPClient/gphelper.h @@ -1,16 +1,16 @@ #ifndef GPHELPER_H #define GPHELPER_H +#include +#include +#include +#include +#include +#include + #include "samlloginwindow.h" #include "gpgateway.h" -#include -#include -#include -#include -#include -#include - const QString UA = "PAN GlobalProtect"; diff --git a/GPClient/loginparams.cpp b/GPClient/loginparams.cpp index 54850c9..5b59fe3 100644 --- a/GPClient/loginparams.cpp +++ b/GPClient/loginparams.cpp @@ -1,6 +1,6 @@ -#include "loginparams.h" +#include -#include +#include "loginparams.h" LoginParams::LoginParams(const QString clientos) { diff --git a/GPClient/loginparams.h b/GPClient/loginparams.h index f83bca0..87d3d10 100644 --- a/GPClient/loginparams.h +++ b/GPClient/loginparams.h @@ -1,7 +1,7 @@ #ifndef LOGINPARAMS_H #define LOGINPARAMS_H -#include +#include class LoginParams { diff --git a/GPClient/main.cpp b/GPClient/main.cpp index 59fde3e..68c1a1f 100644 --- a/GPClient/main.cpp +++ b/GPClient/main.cpp @@ -1,12 +1,14 @@ -#include "singleapplication.h" -#include "gpclient.h" -#include "enhancedwebview.h" - -#include +#include +#include +#include +#include #include #include -static const QString version = "v1.3.3"; +#include "singleapplication.h" +#include "gpclient.h" +#include "enhancedwebview.h" +#include "version.h" int main(int argc, char *argv[]) { @@ -19,7 +21,7 @@ int main(int argc, char *argv[]) static plog::ColorConsoleAppender consoleAppender; plog::init(plog::debug, logFile.toUtf8()).addAppender(&consoleAppender); - PLOGI << "GlobalProtect started, version: " << version; + PLOGI << "GlobalProtect started, version: " << VERSION; QString port = QString::fromLocal8Bit(qgetenv(ENV_CDP_PORT)); diff --git a/GPClient/normalloginwindow.cpp b/GPClient/normalloginwindow.cpp index a712bee..1626a09 100644 --- a/GPClient/normalloginwindow.cpp +++ b/GPClient/normalloginwindow.cpp @@ -1,8 +1,8 @@ +#include + #include "normalloginwindow.h" #include "ui_normalloginwindow.h" -#include - NormalLoginWindow::NormalLoginWindow(QWidget *parent) : QDialog(parent), ui(new Ui::NormalLoginWindow) diff --git a/GPClient/normalloginwindow.h b/GPClient/normalloginwindow.h index d697aba..a2327bb 100644 --- a/GPClient/normalloginwindow.h +++ b/GPClient/normalloginwindow.h @@ -1,7 +1,7 @@ #ifndef PORTALAUTHWINDOW_H #define PORTALAUTHWINDOW_H -#include +#include namespace Ui { class NormalLoginWindow; diff --git a/GPClient/portalauthenticator.cpp b/GPClient/portalauthenticator.cpp index 7570a23..e0900ea 100644 --- a/GPClient/portalauthenticator.cpp +++ b/GPClient/portalauthenticator.cpp @@ -1,3 +1,6 @@ +#include +#include + #include "portalauthenticator.h" #include "gphelper.h" #include "normalloginwindow.h" @@ -7,9 +10,6 @@ #include "portalconfigresponse.h" #include "gpgateway.h" -#include -#include - using namespace gpclient::helper; PortalAuthenticator::PortalAuthenticator(const QString& portal, const QString& clientos) : QObject() diff --git a/GPClient/portalauthenticator.h b/GPClient/portalauthenticator.h index 0042bbd..4a39fc3 100644 --- a/GPClient/portalauthenticator.h +++ b/GPClient/portalauthenticator.h @@ -1,12 +1,13 @@ #ifndef PORTALAUTHENTICATOR_H #define PORTALAUTHENTICATOR_H +#include + #include "portalconfigresponse.h" #include "normalloginwindow.h" #include "samlloginwindow.h" #include "preloginresponse.h" -#include class PortalAuthenticator : public QObject { diff --git a/GPClient/portalconfigresponse.cpp b/GPClient/portalconfigresponse.cpp index 790056d..c5c578f 100644 --- a/GPClient/portalconfigresponse.cpp +++ b/GPClient/portalconfigresponse.cpp @@ -1,8 +1,8 @@ -#include "portalconfigresponse.h" - -#include +#include #include +#include "portalconfigresponse.h" + QString PortalConfigResponse::xmlUserAuthCookie = "portal-userauthcookie"; QString PortalConfigResponse::xmlPrelogonUserAuthCookie = "portal-prelogonuserauthcookie"; QString PortalConfigResponse::xmlGateways = "gateways"; diff --git a/GPClient/portalconfigresponse.h b/GPClient/portalconfigresponse.h index c79dae0..b6fe0d9 100644 --- a/GPClient/portalconfigresponse.h +++ b/GPClient/portalconfigresponse.h @@ -1,11 +1,11 @@ #ifndef PORTALCONFIGRESPONSE_H #define PORTALCONFIGRESPONSE_H -#include "gpgateway.h" +#include +#include +#include -#include -#include -#include +#include "gpgateway.h" class PortalConfigResponse { diff --git a/GPClient/preloginresponse.cpp b/GPClient/preloginresponse.cpp index d148b60..6fd6f40 100644 --- a/GPClient/preloginresponse.cpp +++ b/GPClient/preloginresponse.cpp @@ -1,9 +1,9 @@ -#include "preloginresponse.h" - -#include -#include +#include +#include #include +#include "preloginresponse.h" + QString PreloginResponse::xmlAuthMessage = "authentication-message"; QString PreloginResponse::xmlLabelUsername = "username-label"; QString PreloginResponse::xmlLabelPassword = "password-label"; diff --git a/GPClient/preloginresponse.h b/GPClient/preloginresponse.h index 1b8b09c..772a037 100644 --- a/GPClient/preloginresponse.h +++ b/GPClient/preloginresponse.h @@ -1,8 +1,8 @@ #ifndef PRELOGINRESPONSE_H #define PRELOGINRESPONSE_H -#include -#include +#include +#include class PreloginResponse { diff --git a/GPClient/samlloginwindow.cpp b/GPClient/samlloginwindow.cpp index 2729ca1..70d58b4 100644 --- a/GPClient/samlloginwindow.cpp +++ b/GPClient/samlloginwindow.cpp @@ -1,9 +1,9 @@ -#include "samlloginwindow.h" - -#include +#include +#include +#include #include -#include -#include + +#include "samlloginwindow.h" SAMLLoginWindow::SAMLLoginWindow(QWidget *parent) : QDialog(parent) diff --git a/GPClient/samlloginwindow.h b/GPClient/samlloginwindow.h index 09d8a2e..2d6bc79 100644 --- a/GPClient/samlloginwindow.h +++ b/GPClient/samlloginwindow.h @@ -1,11 +1,11 @@ #ifndef SAMLLOGINWINDOW_H #define SAMLLOGINWINDOW_H -#include "enhancedwebview.h" +#include +#include +#include -#include -#include -#include +#include "enhancedwebview.h" class SAMLLoginWindow : public QDialog { diff --git a/GPClient/settingsdialog.h b/GPClient/settingsdialog.h index 234db96..9e29e48 100644 --- a/GPClient/settingsdialog.h +++ b/GPClient/settingsdialog.h @@ -1,7 +1,7 @@ #ifndef SETTINGSDIALOG_H #define SETTINGSDIALOG_H -#include +#include namespace Ui { class SettingsDialog; diff --git a/GPService/gpservice.cpp b/GPService/gpservice.cpp index be0c0a9..7d0034b 100644 --- a/GPService/gpservice.cpp +++ b/GPService/gpservice.cpp @@ -1,12 +1,12 @@ -#include "gpservice.h" -#include "gpserviceadaptor.h" - #include -#include #include #include #include #include +#include + +#include "gpservice.h" +#include "gpserviceadaptor.h" GPService::GPService(QObject *parent) : QObject(parent) diff --git a/GPService/main.cpp b/GPService/main.cpp index 096fe10..06f8743 100644 --- a/GPService/main.cpp +++ b/GPService/main.cpp @@ -1,4 +1,5 @@ -#include +#include + #include "gpservice.h" #include "singleapplication.h" #include "sigwatch.h"