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