mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
ref: hashComparer
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user