mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: link argument
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
#include "tcpclient.h"
|
||||
|
||||
TCPClient::TCPClient(QObject *parent) :
|
||||
QObject(parent)
|
||||
QObject(parent),
|
||||
sendSystem(nullptr),
|
||||
socket(nullptr),
|
||||
recognizeSystem(nullptr),
|
||||
isConnected(false)
|
||||
{
|
||||
}
|
||||
|
||||
void TCPClient::initialize(RecognizeSystem *recognize,ExternalExecuter *externalExecuter,SendSystem *sendSystem)
|
||||
void TCPClient::initialize(RecognizeSystem *recognize,SendSystem *sendSystem)
|
||||
{
|
||||
this->recognizeSystem = recognize;
|
||||
this->externalExecuter = externalExecuter;
|
||||
this->sendSystem = sendSystem;
|
||||
isConnected = false;
|
||||
|
||||
@@ -21,7 +24,7 @@ void TCPClient::setConnect(ServerSettings *serverSettings)
|
||||
{
|
||||
socket = new QTcpSocket();
|
||||
qDebug() << "TCPCLient thread: " << thread();
|
||||
if (socket != NULL && socket->state() == QTcpSocket::ConnectedState)
|
||||
if (socket != nullptr && socket->state() == QTcpSocket::ConnectedState)
|
||||
{
|
||||
emit sigSendDebugLog("already connected");
|
||||
return;
|
||||
@@ -74,7 +77,6 @@ void TCPClient::slotConnectNotify()
|
||||
isConnected = false;
|
||||
emit sigSendDebugLog("Connect invalid");
|
||||
emit sigConnectionState(false);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -99,8 +101,3 @@ bool TCPClient::getIsConnected() const
|
||||
{
|
||||
return isConnected;
|
||||
}
|
||||
|
||||
TCPClient::~TCPClient()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user