Skip to content

Commit

Permalink
refactor: reduce code duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
saturneric committed Jan 27, 2025
1 parent 64311a8 commit fb2e47d
Show file tree
Hide file tree
Showing 10 changed files with 440 additions and 570 deletions.
4 changes: 2 additions & 2 deletions src/core/function/ArchiveFileOperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ auto ArchiveCloseWriteCallback(struct archive *, void *client_data) -> int {
}

void ArchiveFileOperator::NewArchive2DataExchanger(
const QString &target_directory, std::shared_ptr<GFDataExchanger> exchanger,
const QString &target_directory, QSharedPointer<GFDataExchanger> exchanger,
const OperationCallback &cb) {
RunIOOperaAsync(
[=](const DataObjectPtr &data_object) -> GFError {
Expand Down Expand Up @@ -194,7 +194,7 @@ void ArchiveFileOperator::NewArchive2DataExchanger(
}

void ArchiveFileOperator::ExtractArchiveFromDataExchanger(
std::shared_ptr<GFDataExchanger> ex, const QString &target_path,
QSharedPointer<GFDataExchanger> ex, const QString &target_path,
const OperationCallback &cb) {
RunIOOperaAsync(
[=](const DataObjectPtr &data_object) -> GFError {
Expand Down
4 changes: 2 additions & 2 deletions src/core/function/ArchiveFileOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class GPGFRONTEND_CORE_EXPORT ArchiveFileOperator {
* @param files
*/
static void NewArchive2DataExchanger(const QString &target_directory,
std::shared_ptr<GFDataExchanger>,
QSharedPointer<GFDataExchanger>,
const OperationCallback &cb);

/**
Expand All @@ -63,7 +63,7 @@ class GPGFRONTEND_CORE_EXPORT ArchiveFileOperator {
* @param base_path
*/
static void ExtractArchiveFromDataExchanger(
std::shared_ptr<GFDataExchanger> fd, const QString &target_path,
QSharedPointer<GFDataExchanger> fd, const QString &target_path,
const OperationCallback &cb);
};
} // namespace GpgFrontend
Loading

0 comments on commit fb2e47d

Please sign in to comment.