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