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