connect(_rootJob.data(), &PropagatorJob::finished, this, &OwncloudPropagator::emitFinished);
- // If needed, make sure we have up to date E2E information before scheduling the first job
- // otherwise we start right away
- if (_account->capabilities().clientSideEncryptionAvailable()) {
- connect(_account->e2e(), &ClientSideEncryption::folderEncryptedStatusFetchDone,
- this, &OwncloudPropagator::onFolderEncryptedStatusFetchDone);
- _account->e2e()->fetchFolderEncryptedStatus();
- } else {
- scheduleNextJob();
- }
+ scheduleNextJob();
}
const SyncOptions &OwncloudPropagator::syncOptions() const
return _localDir + tmp_file_name;
}
-void OwncloudPropagator::onFolderEncryptedStatusFetchDone()
-{
- disconnect(_account->e2e(), &ClientSideEncryption::folderEncryptedStatusFetchDone,
- this, &OwncloudPropagator::onFolderEncryptedStatusFetchDone);
- scheduleNextJob();
-}
-
void OwncloudPropagator::scheduleNextJob()
{
QTimer::singleShot(0, this, &OwncloudPropagator::scheduleNextJobImpl);
return shouldDiscoverLocally(path);
};
+ // If needed, make sure we have up to date E2E information before the
+ // discovery phase, otherwise we start right away
+ if (_account->capabilities().clientSideEncryptionAvailable()) {
+ connect(_account->e2e(), &ClientSideEncryption::folderEncryptedStatusFetchDone,
+ this, &SyncEngine::onFolderEncryptedStatusFetchDone);
+ _account->e2e()->fetchFolderEncryptedStatus();
+ } else {
+ slotStartDiscovery();
+ }
+}
+
+void SyncEngine::onFolderEncryptedStatusFetchDone()
+{
+ disconnect(_account->e2e(), &ClientSideEncryption::folderEncryptedStatusFetchDone,
+ this, &SyncEngine::onFolderEncryptedStatusFetchDone);
slotStartDiscovery();
}
void seenLockedFile(const QString &fileName);
private slots:
+ void onFolderEncryptedStatusFetchDone();
void slotStartDiscovery();
void slotFolderDiscovered(bool local, const QString &folder);