Skip to content

Commit

Permalink
Refactoring and review comments fixing. II.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander committed Jan 19, 2024
1 parent 2d6a19e commit c929570
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
17 changes: 0 additions & 17 deletions src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,23 +1150,6 @@ bool OwncloudPropagator::isInBulkUploadBlackList(const QString &file) const
return _bulkUploadBlackList.contains(file);
}

QSharedPointer<FolderMetadata> OwncloudPropagator::findTopLevelFolderMetadata(const QString &path) const
{
return _topLevelFoldersMetadata.value(path, QSharedPointer<FolderMetadata>{});
}

const QMap<QString, QSharedPointer<FolderMetadata>> &OwncloudPropagator::topLevelFolderMetadata() const
{
return _topLevelFoldersMetadata;
}

void OwncloudPropagator::setTopLevelFoldersMetadata(const QMap<QString, QSharedPointer<FolderMetadata>> &topLevelFolderMetadata)
{
_topLevelFoldersMetadata = topLevelFolderMetadata;
}

// ================================================================================

PropagatorJob::PropagatorJob(OwncloudPropagator *propagator)
: QObject(propagator)
{
Expand Down
7 changes: 0 additions & 7 deletions src/libsync/owncloudpropagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,6 @@ class OWNCLOUDSYNC_EXPORT OwncloudPropagator : public QObject

[[nodiscard]] bool isInBulkUploadBlackList(const QString &file) const;

[[nodiscard]] QSharedPointer<FolderMetadata> findTopLevelFolderMetadata(const QString &path) const;
[[nodiscard]] const QMap<QString, QSharedPointer<FolderMetadata>> &topLevelFolderMetadata() const;

void setTopLevelFoldersMetadata(const QMap<QString, QSharedPointer<FolderMetadata>> &topLevelFolderMetadata);

private slots:

void abortTimeout()
Expand Down Expand Up @@ -699,8 +694,6 @@ private slots:
bool _scheduleDelayedTasks = false;

QSet<QString> &_bulkUploadBlackList;

QMap<QString, QSharedPointer<FolderMetadata>> _topLevelFoldersMetadata;

static bool _allowDelayedUpload;
};
Expand Down
3 changes: 1 addition & 2 deletions src/libsync/syncengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,7 @@ void SyncEngine::slotDiscoveryFinished()
// Emit the started signal only after the propagator has been set up.
if (_needsUpdate)
Q_EMIT started();

_propagator->setTopLevelFoldersMetadata(_discoveryPhase->_topLevelE2eeFoldersMetadata);

_propagator->start(std::move(_syncItems));

qCInfo(lcEngine) << "#### Post-Reconcile end #################################################### " << _stopWatch.addLapTime(QStringLiteral("Post-Reconcile Finished")) << "ms";
Expand Down

0 comments on commit c929570

Please sign in to comment.