diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 69e28f953dda8..cb3734e17a130 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -594,7 +594,7 @@ void OwncloudPropagator::start(SyncFileItemVector &&items) } foreach (PropagatorJob *it, directoriesToRemove) { - _rootJob->_dirDeletionJobs.appendJob(it); + _rootJob->appendDirDeletionJob(it); } connect(_rootJob.data(), &PropagatorJob::finished, this, &OwncloudPropagator::emitFinished); @@ -1292,6 +1292,11 @@ qint64 PropagateRootDirectory::committedDiskSpace() const return _subJobs.committedDiskSpace() + _dirDeletionJobs.committedDiskSpace(); } +void PropagateRootDirectory::appendDirDeletionJob(PropagatorJob *job) +{ + _dirDeletionJobs.appendJob(job); +} + bool PropagateRootDirectory::scheduleSelfOrChild() { qCInfo(lcRootDirectory()) << "scheduleSelfOrChild" << _state << "pending uploads" << propagator()->delayedTasks().size() << "subjobs state" << _subJobs._state; diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index 458a19ee08704..95fe4e74310c1 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -365,8 +365,6 @@ class OWNCLOUDSYNC_EXPORT PropagateRootDirectory : public PropagateDirectory { Q_OBJECT public: - PropagatorCompositeJob _dirDeletionJobs; - explicit PropagateRootDirectory(OwncloudPropagator *propagator); bool scheduleSelfOrChild() override; @@ -375,6 +373,9 @@ class OWNCLOUDSYNC_EXPORT PropagateRootDirectory : public PropagateDirectory [[nodiscard]] qint64 committedDiskSpace() const override; +public slots: + void appendDirDeletionJob(PropagatorJob *job); + private slots: void slotSubJobsFinished(SyncFileItem::Status status) override; void slotDirDeletionJobsFinished(SyncFileItem::Status status); @@ -383,6 +384,8 @@ private slots: bool scheduleDelayedJobs(); + PropagatorCompositeJob _dirDeletionJobs; + SyncFileItem::Status _errorStatus = SyncFileItem::Status::NoStatus; };