Skip to content

Commit

Permalink
Refactoring and review comments fixing. IV.
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 734c1d8 commit 9b98c34
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,7 @@ void OwncloudPropagator::startFilePropagation(const SyncFileItemPtr &item,
}
}

void OwncloudPropagator::processE2eeMetadataMigration(const SyncFileItemPtr &item,
QStack<QPair<QString, PropagateDirectory *>> &directories)
void OwncloudPropagator::processE2eeMetadataMigration(const SyncFileItemPtr &item, QStack<QPair<QString, PropagateDirectory *>> &directories)
{
if (item->_e2eEncryptionMaximumAvailableStatus >= EncryptionStatusEnums::ItemEncryptionStatus::EncryptedMigratedV2_0) {
// migrating to v2.0+
Expand Down
3 changes: 1 addition & 2 deletions src/libsync/owncloudpropagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,7 @@ class OWNCLOUDSYNC_EXPORT OwncloudPropagator : public QObject
QString &removedDirectory,
QString &maybeConflictDirectory);

void processE2eeMetadataMigration(const SyncFileItemPtr &item,
QStack<QPair<QString, PropagateDirectory *>> &directories);
void processE2eeMetadataMigration(const SyncFileItemPtr &item, QStack<QPair<QString, PropagateDirectory *>> &directories);

[[nodiscard]] const SyncOptions &syncOptions() const;
void setSyncOptions(const SyncOptions &syncOptions);
Expand Down
4 changes: 2 additions & 2 deletions src/libsync/propagatedownload.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ class OWNCLOUDSYNC_EXPORT GETEncryptedFileJob : public GETFileJob
// DOES NOT take ownership of the device.
explicit GETEncryptedFileJob(AccountPtr account, const QString &path, QIODevice *device,
const QMap<QByteArray, QByteArray> &headers, const QByteArray &expectedEtagForResume,
qint64 resumeStart, FolderMetadata::FolderMetadata::EncryptedFile encryptedInfo, QObject *parent = nullptr);
qint64 resumeStart, FolderMetadata::EncryptedFile encryptedInfo, QObject *parent = nullptr);
explicit GETEncryptedFileJob(AccountPtr account, const QUrl &url, QIODevice *device,
const QMap<QByteArray, QByteArray> &headers, const QByteArray &expectedEtagForResume,
qint64 resumeStart, FolderMetadata::FolderMetadata::EncryptedFile encryptedInfo, QObject *parent = nullptr);
qint64 resumeStart, FolderMetadata::EncryptedFile encryptedInfo, QObject *parent = nullptr);
~GETEncryptedFileJob() override = default;

protected:
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/propagatedownloadencrypted.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private slots:
QString _errorString;
QString _remoteParentPath;
QString _parentPathInDb;
// TODO: Create a base class with this member in 'protected' and virtual slots for fetch/upload, then refactor this and other similar classes to inherit the base class

QScopedPointer<EncryptedFolderMetadataHandler> _encryptedFolderMetadataHandler;
};

Expand Down
2 changes: 1 addition & 1 deletion src/libsync/propagateremotemkdir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "common/asserts.h"
#include "encryptfolderjob.h"
#include "filesystem.h"
#include <csync/csync.h>
#include "csync/csync.h"

#include <QFile>
#include <QLoggingCategory>
Expand Down
3 changes: 1 addition & 2 deletions src/libsync/propagateuploadencrypted.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ private slots:
QByteArray _generatedIv;
QString _completeFileName;
QString _remoteParentAbsolutePath;
// TODO: Create a base class with this member in 'protected' and virtual slots for fetch/upload, then refactor this and other similar classes to inherit the
// base class

QScopedPointer<EncryptedFolderMetadataHandler> _encryptedFolderMetadataHandler;
};

Expand Down
2 changes: 0 additions & 2 deletions src/libsync/vfs/cfapi/hydrationjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ private slots:
QString _errorString;
QString _remoteParentPath;

// TODO: Create a base class with this member in 'protected' and virtual slots for fetch/upload, then refactor this and other similar classes to inherit the
// base class
QScopedPointer<EncryptedFolderMetadataHandler> _encryptedFolderMetadataHandler;
};

Expand Down

0 comments on commit 9b98c34

Please sign in to comment.