feat: change buttonsView

* add buttonsView common(complete)
* add buttonsView instructor(notWorking)
* BUGFIX sendSystem meth update files
* BUGFIX updateController meth checkNeedUpdate
This commit is contained in:
semenov
2024-12-11 17:10:34 +03:00
parent 8a0695108c
commit 9039107ad9
80 changed files with 145071 additions and 8038 deletions

View File

@@ -7,17 +7,16 @@ UpdateController::UpdateController(DataParser *parser,SendSystem *sendSystem, QO
{
this->dataParser = parser;
this->sendSystem = sendSystem;
localPath = QDir::currentPath() + applicationFolderName;
calculateStreamingHash();
applicationFolderPath = QDir::currentPath() + applicationFolderName;
//calculateStreamingHash();
}
void UpdateController::calculateCommonHash()
{
fileDataList.clear();
calculateHash(localPath);
calculateHash(applicationFolderPath);
dataParser->createFileDataList(fileDataList,hashFilename);
qDebug() << "UpdateController threadID " << QThread::currentThreadId();
qDebug() << " OR " << thread();
}
void UpdateController::calculateStreamingHash()
@@ -31,17 +30,16 @@ void UpdateController::calculateHash(QString path)
{
qDebug() << "Try calculate";
QDirIterator iterator(path,QDirIterator::Subdirectories);
QDir dir(path);
QDirIterator iterator(dir,QDirIterator::Subdirectories);
fileDataList.clear();
QList<FileData> *files = new QList<FileData>;
QList<FileData> * folders = new QList<FileData>;
QList<FileData> *folders = new QList<FileData>;
if(!QDir(applicationFolderName).exists()){ //проверка на наличие папки
QDir().mkdir(applicationFolderName);
if(!QDir(path).exists()){ //проверка на наличие папки
QDir().mkdir(path);
}
QDir dir(path);
QString hashString;
while (iterator.hasNext())