feat: add scenario conflict resolver

This commit is contained in:
semenov
2026-03-11 15:53:08 +03:00
parent 4edfae5740
commit eb70ed9a6e
23 changed files with 29888 additions and 29762 deletions

View File

@@ -3,8 +3,8 @@
void ExternalExecuter::callApp()
{
QProcess *myProcess = new QProcess(this);
QStringList args;
args << "1";
QStringList args = QCoreApplication::arguments();
args.removeFirst();
myProcess->start(programPath,args);
myProcess->waitForStarted();
@@ -21,10 +21,11 @@ bool ExternalExecuter::findApp()
if(iterator.fileInfo().fileName() == applicationEXEName){
programPath = iterator.fileInfo().absoluteFilePath();
isAvailable = true;
return true;
}
}
isAvailable = false;
return false;
}
@@ -37,3 +38,8 @@ void ExternalExecuter::setIsAutoStart(bool value)
{
isAutoStart = value;
}
bool ExternalExecuter::getIsAvailable() const
{
return isAvailable;
}

View File

@@ -23,9 +23,12 @@ public:
bool getIsAutoStart() const;
void setIsAutoStart(bool value);
bool getIsAvailable() const;
private:
QString programPath;
bool isAutoStart;
bool isAvailable;
};
#endif // EXTERNALEXECUTER_H

View File

@@ -29,8 +29,13 @@ void HashComparer::CompareDeltas(QList<FileData> *serverStreamingHash, QList<Fil
if(!serverStreamingHash->contains(item))
{
if (item.path.contains("docs.xml")) continue; //фильтр на docs
quint32 fileDataIndex = findIndexByPath(*serverStreamingHash, item.path);
serverFiles->append(serverStreamingHash->at(fileDataIndex));
if (item.path.contains("CfiList.xml")) continue;
qint32 fileDataIndex = findIndexByPath(*serverStreamingHash, item.path);
if (fileDataIndex != -1)
{
serverFiles->append(serverStreamingHash->at(fileDataIndex));
}
files->append(item);
}
}
@@ -62,7 +67,14 @@ void HashComparer::showDeltas()
for (int i = 0; i < filesForUpdate->size(); i++)
{
FileData local = filesForUpdate->at(i);
FileData server = serverFiles->at(i);
FileData server = FileData();
server.lastUpdate = "нет";
if (serverFiles->size() > i)
{
server = serverFiles->at(i);
}
emit sigAddToList(local,server);
}