mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
Display error when OpenConnect was not found (#81)
This commit is contained in:
@@ -31,6 +31,7 @@ GPClient::GPClient(QWidget *parent)
|
||||
vpn = new com::yuezk::qt::GPService("com.yuezk.qt.GPService", "/", QDBusConnection::systemBus(), this);
|
||||
connect(vpn, &com::yuezk::qt::GPService::connected, this, &GPClient::onVPNConnected);
|
||||
connect(vpn, &com::yuezk::qt::GPService::disconnected, this, &GPClient::onVPNDisconnected);
|
||||
connect(vpn, &com::yuezk::qt::GPService::error, this, &GPClient::onVPNError);
|
||||
connect(vpn, &com::yuezk::qt::GPService::logAvailable, this, &GPClient::onVPNLogAvailable);
|
||||
|
||||
// Initiallize the context menu of system tray.
|
||||
@@ -477,6 +478,12 @@ void GPClient::onVPNDisconnected()
|
||||
}
|
||||
}
|
||||
|
||||
void GPClient::onVPNError(QString errorMessage)
|
||||
{
|
||||
updateConnectionStatus(VpnStatus::disconnected);
|
||||
openMessageBox("Failed to connect", errorMessage);
|
||||
}
|
||||
|
||||
void GPClient::onVPNLogAvailable(QString log)
|
||||
{
|
||||
PLOGI << log;
|
||||
|
@@ -45,6 +45,7 @@ private slots:
|
||||
|
||||
void onVPNConnected();
|
||||
void onVPNDisconnected();
|
||||
void onVPNError(QString errorMessage);
|
||||
void onVPNLogAvailable(QString log);
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user