ref: delete duplicate meth

This commit is contained in:
semenov
2025-09-22 11:53:54 +03:00
parent 205f60fd7d
commit b695522a68
6 changed files with 75 additions and 52 deletions

View File

@@ -24,10 +24,11 @@ void SendSystem::setClient(Client *client,QTcpSocket *socket)
isSendStopped = false;
}
void SendSystem::sendMessageBlock(QString message)
void SendSystem::sendNotify(QString notify)
{
auto messageBlock = emit sigSendNotify(message);
sendXmlAnswer(messageBlock);
qDebug() << "SendNotify thread: " << QThread::currentThreadId();
auto answer = emit sigSendNotify(notify);
sendXmlAnswer(answer);
}
void SendSystem::sendFileBlock(QString path)
@@ -234,13 +235,6 @@ void SendSystem::sendHello()
socket->write(SERVER_HELLO);
}
void SendSystem::sendNotify(QString notify)
{
qDebug() << "SendNotify thread: " << QThread::currentThreadId();
auto answer = emit sigSendNotify(notify);//"END");
sendXmlAnswer(answer);
}
void SendSystem::sendXmlAnswer(QByteArray array, PacketType packetType)
{
qDebug() << "SendSystemThread: " << QThread::currentThreadId();

View File

@@ -360,7 +360,7 @@ QList<FileData>* UpdateController::calculateHash(QString path)
QFile file(fileInfo.absoluteFilePath());
quint64 fileSize = file.size(); //буффер для хэширования крупных файлов
const quint64 bufferSize = 10240;
const quint64 bufferSize = 1024;
if(fileInfo.isHidden()) continue;

View File

@@ -45,7 +45,6 @@ void ClientHandler::initialize(int descriptor,ServerLMSWidget *serverWidget,
connect(this,&ClientHandler::sigFolderBlock,sendSystem,&SendSystem::sendFolderBlock,Qt::AutoConnection);
connect(this,&ClientHandler::sigGetIsSendStopped,sendSystem,&SendSystem::getIsSendStopped,Qt::AutoConnection);
connect(this,&ClientHandler::sigSendDeleteBlock,sendSystem,&SendSystem::sendDeleteBlock,Qt::AutoConnection);
connect(this,&ClientHandler::sigSendMessageBlock,sendSystem,&SendSystem::sendMessageBlock,Qt::AutoConnection);
connect(this,&ClientHandler::sigNeedUpdate,sendSystem,&SendSystem::sendNeedUpdate,Qt::AutoConnection);
connect(this,&ClientHandler::sigSendNotify,sendSystem,&SendSystem::sendNotify,Qt::AutoConnection);
connect(this,&ClientHandler::sigSendFileBlockWithRename,sendSystem,&SendSystem::sendFileBlockWithRename,Qt::AutoConnection);
@@ -151,9 +150,9 @@ void ClientHandler::sendDeleteBlock(QString path)
emit sigSendDeleteBlock(path);
}
void ClientHandler::sendMessageBlock(QString text)
void ClientHandler::sendNotify(QString text)
{
emit sigSendMessageBlock(text);
emit sigSendNotify(text);
}
void ClientHandler::sendNeedUpdate(bool flag, quint64 size, quint64 fileCount,quint64 deleteCount)

View File

@@ -32,7 +32,7 @@ public:
bool getIsSendStopped();
void sendDeleteBlock(QString path);
void sendFinish();
void sendMessageBlock(QString text);
void sendNotify(QString text);
void sendNeedUpdate(bool flag, quint64 size,quint64 fileCount,quint64 deleteCount);
void sendDisable();
void recognize();
@@ -57,7 +57,6 @@ signals:
void sigFileBlockByteArray(QByteArray array, PacketType packetType);
bool sigGetIsSendStopped();
void sigSendDeleteBlock(QString path);
void sigSendMessageBlock(QString text);
void sigNeedUpdate(bool flag,quint64 size,quint64 fileCount,quint64 deleteCount);
void sigClientDisconnected(QString address,QString port);
void sigSendHash();