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