feat: complete delay messages

This commit is contained in:
semenov
2025-08-05 16:34:26 +03:00
parent a6022d7ec8
commit c3bd64588a
12 changed files with 51 additions and 61 deletions

View File

@@ -22,7 +22,7 @@ void SendSystem::initialize(DataParser *dataParser,Logger *logger)
void SendSystem::setClient(Client *client,QTcpSocket *socket)
{
this->socket = socket;
this->isUnity = client->getIsUnity();
this->type = client->GETTYPE();
this->client = client;
isSendStopped = false;
}
@@ -85,7 +85,8 @@ void SendSystem::sendFileBlockByteArray(QByteArray array, PacketType packetType)
{
qDebug() << "sendFileBlockByteArray thread: " << QThread::currentThreadId();
if(!client->getIsUnity())
if(client->GETTYPE() == TypeClientAutorization::TYPE_QT_CLIENT ||
client->GETTYPE() == TypeClientAutorization::TYPE_GUI)
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
@@ -193,7 +194,8 @@ void SendSystem::sendDeleteBlock(QString path)
void SendSystem::sendPacketType(PacketType packetType)
{
if(!client->getIsUnity())
if (client->GETTYPE() == TypeClientAutorization::TYPE_QT_CLIENT ||
client->GETTYPE() == TypeClientAutorization::TYPE_GUI)
{
QDataStream stream(socket);
@@ -225,7 +227,8 @@ void SendSystem::sendNotify(QString notify)
void SendSystem::sendXmlAnswer(QByteArray array, PacketType packetType)
{
qDebug() << "SendSystemThread: " << QThread::currentThreadId();
if(!client->getIsUnity())
if (client->GETTYPE() == TypeClientAutorization::TYPE_QT_CLIENT ||
client->GETTYPE() == TypeClientAutorization::TYPE_GUI)
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);