feat: choosing complete

This commit is contained in:
semenov
2026-03-10 14:35:05 +03:00
parent 1d76e9785b
commit 4edfae5740
17 changed files with 25967 additions and 25744 deletions

View File

@@ -13,6 +13,9 @@ void HashComparer::initialize(VersionContainer *versionContainer,UpdateNotifyWid
this->versionContainer = versionContainer;
this->updateWidget = updateWidget;
filesForUpdate = new QList<FileData>;
connect(this,&HashComparer::sigAddToList,updateWidget,&UpdateNotifyWidget::addToList,Qt::QueuedConnection);
connect(this,&HashComparer::sigGetUpdateList,updateWidget,&UpdateNotifyWidget::getUpdateList,Qt::DirectConnection);
}
void HashComparer::CompareDeltas(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash)
@@ -60,7 +63,7 @@ void HashComparer::showDeltas()
{
FileData local = filesForUpdate->at(i);
FileData server = serverFiles->at(i);
updateWidget->addToList(local,server);
emit sigAddToList(local,server);
}
emit sigHaveDelta();
@@ -73,7 +76,7 @@ quint16 HashComparer::getFileUpdateCount() const
QList<FileData> *HashComparer::getFilesForUpdate() const
{
QList<FileData> *completeList = filesForUpdate;
QList<FileData> *completeList = emit sigGetUpdateList();
for (int i = 0; i < completeList->count();i++)
{
@@ -86,5 +89,5 @@ QList<FileData> *HashComparer::getFilesForUpdate() const
completeList->replace(i,data);
}
return filesForUpdate;
return completeList;
}