Comparar commits

..

1 Commits

2 arquivos alterados com 2 adições e 9 exclusões
-5
Ver Arquivo
@@ -312,12 +312,7 @@ 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) {
+2 -4
Ver Arquivo
@@ -49,6 +49,7 @@ bool PropagateFiles::scheduleNextJob()
finalize();
return true;
}
_subJobs.reserve(_totalItems);
}
if (_state == Running) {
@@ -82,12 +83,9 @@ 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());
// Equivalent to Qt5 takeFirst()
const SyncFileItemPtr &item = syncJobs.first();
const SyncFileItemPtr &item = syncJobs.takeFirst();
PropagateItemJob* job = propagator()->createJob(item);
_subJobs.append(job);
syncJobs.pop_front();
return possiblyRunNextJob(job);
}