feat: before threading

This commit is contained in:
semenov
2024-08-19 11:57:33 +03:00
parent 883ac44e6b
commit c79faae730
48 changed files with 722 additions and 562 deletions

View File

@@ -5,33 +5,8 @@ UpdateController::UpdateController(DataParser *parser, QObject *parent) :
{
this->dataParser = parser;
localPath = QDir::currentPath() + "/Application";
countSend = 0;
}
void UpdateController::SendFile(QDataStream &stream)
{
/* Открываем файл для Чтения*/
QFile file(hashFilename);
stream << PacketType::TYPE_FILE; //Отправляем тип блока
QFileInfo fileInfo(file);
fileSize = fileInfo.size();
stream << fileSize;
if(file.open(QFile::ReadOnly | QFile::Text)){
while(!file.atEnd()){
QByteArray data = file.readAll();//file.read(1025*250);
stream << data;
countSend++;
}
qDebug() << Tools::GetTime() << "count end Final: " << countSend;
}
file.close();
countSend = 0;
}
void UpdateController::CalculateHash()
{