ref: hashComparer

This commit is contained in:
semenov
2024-10-07 09:02:53 +03:00
parent 3d66dc16ce
commit 867f0b9730
22 changed files with 255 additions and 134 deletions

View File

@@ -12,6 +12,7 @@ RecognizeSystem::RecognizeSystem(QObject *parent):
sizeReceiveData = 0;
tmpBlock.clear();
countSend = 0;
folderList = new QList<QString>;
}
RecognizeSystem::~RecognizeSystem()
@@ -82,7 +83,6 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
if(packetType == PacketType::TYPE_FILE) //загрузка файлов
{
//ПОЛУЧЕНИЕ ПУТИ
//ПОЛУЧЕНИЕ РАЗМЕРА ФАЙЛА
forever
@@ -107,7 +107,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
emit sigSendDebugLog("CLIENT: filesize: " + QString::number(fileSize));
emit sigSendDebugLog("CLIENT: filePath: " + filePath);
emit sigSocketWaitForReadyRead(100);
socket->waitForReadyRead(100);
break;
}
@@ -122,6 +122,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
{
file.remove(); //удаление файла, если он уже есть, но необходимо обновить
emit sigSendDebugLog(Tools::getTime() + "Delete exist file: " + filePath);
socket->waitForReadyRead(100);
}
@@ -191,7 +192,8 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
if(fileInfo.exists())
{
if(fileInfo.isFile()){
if(fileInfo.isFile())
{
QFile file(filePath);
file.remove();
}
@@ -226,6 +228,10 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
stream >> size;
stream >> fileCount;
if(!stream.commitTransaction()){
continue;
}
emit sigNeedUpdate(flag,size,fileCount);
packetType = PacketType::TYPE_NONE;
}
@@ -326,7 +332,6 @@ void RecognizeSystem::checkAccessType(QString type)
{
if(type == "instructor")
{
updateController->calculateStreamingHash();
mainWindow->callUpdateList();
}
}