refactoring

This commit is contained in:
semenov
2024-08-30 14:51:01 +03:00
parent 0c1ec67d4e
commit d805fc190a
45 changed files with 592 additions and 410 deletions

View File

@@ -8,7 +8,7 @@ UpdateController::UpdateController(DataParser *parser, QObject *parent) :
}
void UpdateController::CalculateHash()
void UpdateController::calculateHash()
{
qDebug() << "Try calculate";
@@ -51,13 +51,13 @@ void UpdateController::CalculateHash()
readSize = qMin(fileSize,bufferSize);
}
hashString = QString(hash.result().toHex());
currentFile.path = Tools::CreateLocalPath(fileInfo.absoluteFilePath());
currentFile.path = Tools::createLocalPath(fileInfo.absoluteFilePath());
currentFile.hash = hashString;
files->push_back(currentFile);
}
else if (fileInfo.isDir() && !fileInfo.isRoot() && fileInfo.fileName() != "..")
{
currentFile.path = Tools::CreateLocalPath(fileInfo.path());
currentFile.path = Tools::createLocalPath(fileInfo.path());
currentFile.hash = "FOLDER";
if(!folders->contains(currentFile)){
@@ -70,7 +70,7 @@ void UpdateController::CalculateHash()
fileDataList.append(*folders);
fileDataList.append(*files);
dataParser->CreateXML(fileDataList);
dataParser->createXML(fileDataList);
delete folders;
delete files;