Передача больших файлов xml с задачами кусками

This commit is contained in:
2025-06-24 12:19:25 +03:00
parent 1fde2d4609
commit 08e982177a
8 changed files with 138 additions and 20 deletions

View File

@@ -41,13 +41,13 @@ AMMtasksWidget::AMMtasksWidget(ConnectorToServer* connectorToServer, TypeList ty
connect(this, &AMMtasksWidget::signal_prepareListItemsForTrainee, taskTreePreparation, &TaskTreePreparation::slot_prepareListItemsForTrainee);
connect(taskTreePreparation, &TaskTreePreparation::signal_listItemsReady, this, &AMMtasksWidget::slot_listItemsReady);
threadAnimation = new QThread();
//threadAnimation = new QThread();
waitAnimationWidget = new WaitAnimationWidget;
QMovie *movie = new QMovie(":/resources/icons/762.gif");
waitAnimationWidget->setParent(this);
waitAnimationWidget->initialize(movie,this);
waitAnimationWidget->moveToThread(threadAnimation);
threadAnimation->start();
//waitAnimationWidget->moveToThread(threadAnimation);
//threadAnimation->start();
ui->btnDelete->setObjectName("btnDelete");
ui->btnDelete->setEnabled(false);
@@ -84,13 +84,13 @@ AMMtasksWidget::~AMMtasksWidget()
waitAnimationWidget->hideWithStop();
taskTreePreparation->stopParser();
threadAnimation->quit();
threadAnimation->wait();
//threadAnimation->quit();
//threadAnimation->wait();
threadPreparation->quit();
threadPreparation->wait();
delete threadAnimation;
//delete threadAnimation;
delete threadPreparation;
delete taskTreePreparation;
@@ -374,5 +374,6 @@ void AMMtasksWidget::on_btnCheck_clicked()
void AMMtasksWidget::on_btnAssignTask_clicked()
{
assignTaskAMMtoTrainee();
if(QMessageBox::question(this, tr("New task"), tr("Assign this task?"), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok)
assignTaskAMMtoTrainee();
}