feat: display Update size and notification

This commit is contained in:
semenov
2024-08-20 15:07:56 +03:00
parent fa79d72b6c
commit cafc764627
15 changed files with 614 additions and 420 deletions

View File

@@ -167,14 +167,13 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
sizeReceiveData += toFile;
countSend++;
emit UpdateBytesAvailable(fileSize,sizeReceiveData);
tmpBlock.clear();
if(sizeReceiveData == fileSize){
emit onSendDebugLog(Tools::GetTime() + "FINAL Count send: " + QString::number(countSend));
emit onSendDebugLog(Tools::GetTime() + "FINAL Size received: " + QString::number(sizeReceiveData));
emit onSendDebugLog(Tools::GetTime() + "FINAL File size" + QString::number(fileSize));
emit UpdateBytesAvailable(fileSize,sizeReceiveData);
break;
}
}
@@ -234,12 +233,13 @@ void RecognizeSystem::Recognize(QTcpSocket *socket)
if(packetType == PacketType::TYPE_NEEDUPDATE){ //нужно обновление
bool flag;
quint64 size;
stream.startTransaction();
stream >> flag;
stream >> size;
emit onNeedUpdate(flag);
emit onNeedUpdate(flag,size);
packetType = PacketType::TYPE_NONE;
}