Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 0e58dd79da |
@@ -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) {
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário