Refactoring
Ui improvements Bug fixes
This commit is contained in:
parent
3645735053
commit
441811e277
13 changed files with 773 additions and 123 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "communicator.h"
|
||||
#include "vpnprotocol.h"
|
||||
#include "core/errorstrings.h"
|
||||
|
||||
Communicator* VpnProtocol::m_communicator = nullptr;
|
||||
|
||||
|
|
@ -34,7 +35,10 @@ Communicator* VpnProtocol::communicator()
|
|||
void VpnProtocol::setLastError(ErrorCode lastError)
|
||||
{
|
||||
m_lastError = lastError;
|
||||
qCritical().noquote() << m_lastError;
|
||||
if (lastError){
|
||||
setConnectionState(ConnectionState::Disconnected);
|
||||
}
|
||||
qCritical().noquote() << "VpnProtocol error, code" << m_lastError << errorString(m_lastError);
|
||||
}
|
||||
|
||||
ErrorCode VpnProtocol::lastError() const
|
||||
|
|
@ -96,10 +100,10 @@ QString VpnProtocol::textConnectionState(ConnectionState connectionState)
|
|||
case ConnectionState::Unknown: return tr("Unknown");
|
||||
case ConnectionState::Disconnected: return tr("Disconnected");
|
||||
case ConnectionState::Preparing: return tr("Preparing");
|
||||
case ConnectionState::Connecting: return tr("Connecting");
|
||||
case ConnectionState::Connecting: return tr("Connecting...");
|
||||
case ConnectionState::Connected: return tr("Connected");
|
||||
case ConnectionState::Disconnecting: return tr("Disconnecting");
|
||||
case ConnectionState::TunnelReconnecting: return tr("TunnelReconnecting");
|
||||
case ConnectionState::Disconnecting: return tr("Disconnecting...");
|
||||
case ConnectionState::TunnelReconnecting: return tr("Reconnecting...");
|
||||
case ConnectionState::Error: return tr("Error");
|
||||
default:
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue