From ccc4d09b36c0d15c33b9d2c7c6eef7e490f0fa56 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 8 Jan 2023 17:37:28 +0100 Subject: [PATCH] shared: FilesSverOptions: Rename members --- cli/commandadd.cpp | 4 ++-- shared/filesaver.cpp | 6 +++--- shared/filesaveroptions.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/commandadd.cpp b/cli/commandadd.cpp index f6108ef..690495c 100644 --- a/cli/commandadd.cpp +++ b/cli/commandadd.cpp @@ -83,8 +83,8 @@ int CommandAdd::handle(QStringList arguments) FileSaverOptions fileSaverOptions; fileSaverOptions.keepGoing = keepGoing; - fileSaverOptions.fillPathsOnlyWithContent = fillContent; - fileSaverOptions.pathsOnly = pathsOnly; + fileSaverOptions.fillExistingContentless = fillContent; + fileSaverOptions.metadataOnly = pathsOnly; fileSaverOptions.verbose = false; indexer = new Indexer(*this->dbService); diff --git a/shared/filesaver.cpp b/shared/filesaver.cpp index bb02ccb..59d15ab 100644 --- a/shared/filesaver.cpp +++ b/shared/filesaver.cpp @@ -127,10 +127,10 @@ SaveFileResult FileSaver::saveFile(const QFileInfo &fileInfo) } } - bool mustFillContent = this->fileSaverOptions.fillPathsOnlyWithContent; + bool mustFillContent = this->fileSaverOptions.fillExistingContentless; if(!mustFillContent) { - mustFillContent = !this->fileSaverOptions.pathsOnly; + mustFillContent = !this->fileSaverOptions.metadataOnly; if(mustFillContent) { auto filetype = this->dbService->queryFileType(fileInfo.absolutePath()); @@ -176,7 +176,7 @@ SaveFileResult FileSaver::saveFile(const QFileInfo &fileInfo) } } } - SaveFileResult result = this->dbService->saveFile(fileInfo, pageData, this->fileSaverOptions.pathsOnly); + SaveFileResult result = this->dbService->saveFile(fileInfo, pageData, this->fileSaverOptions.metadataOnly); if(result == OK && processorReturnCode == OK_WASEMPTY) { return OK_WASEMPTY; diff --git a/shared/filesaveroptions.h b/shared/filesaveroptions.h index 9088685..b1d73a3 100644 --- a/shared/filesaveroptions.h +++ b/shared/filesaveroptions.h @@ -6,9 +6,9 @@ class FileSaverOptions public: bool verbose = false; bool keepGoing = false; - bool pathsOnly = false; + bool metadataOnly = false; /* Whether those previously explicitly without content should be filled */ - bool fillPathsOnlyWithContent = false; + bool fillExistingContentless = false; }; #endif // FILESAVEROPTIONS_H