Comparar commits

..

1 Commits

2 arquivos alterados com 9 adições e 2 exclusões
+5
Ver Arquivo
@@ -312,7 +312,12 @@ void OwncloudPropagator::start(const SyncFileItemVector& items)
directories.push(qMakePair(QString(), _rootJob.data()));
QVector<PropagatorJob*> directoriesToRemove;
QString removedDirectory;
// This needs to be changed before marging - capability to switch on/off scheduling, since
// server needs to decide if to do that - scheduling will also bring more features in the future
// TODO: change it before marging to -> bool enableScheduledRequests = account()->capabilities().scheduling();
bool enableScheduledRequests = true;
PropagateFiles* filesJob = new PropagateFiles(this);
foreach(const SyncFileItemPtr &item, items) {
+4 -2
Ver Arquivo
@@ -49,7 +49,6 @@ bool PropagateFiles::scheduleNextJob()
finalize();
return true;
}
_subJobs.reserve(_totalItems);
}
if (_state == Running) {
@@ -83,9 +82,12 @@ bool PropagateFiles::scheduleNextJob()
bool PropagateFiles::scheduleNewJob(QVector<SyncFileItemPtr> &syncJobs){
// This function is used to schedule new job and lazily create job from sync items
Q_ASSERT(!syncJobs.isEmpty());
const SyncFileItemPtr &item = syncJobs.takeFirst();
// Equivalent to Qt5 takeFirst()
const SyncFileItemPtr &item = syncJobs.first();
PropagateItemJob* job = propagator()->createJob(item);
_subJobs.append(job);
syncJobs.pop_front();
return possiblyRunNextJob(job);
}