Introduce FileSaverOptions to consolidate common parameters
这个提交包含在:
@ -2,6 +2,7 @@
|
||||
#define FILESAVER_H
|
||||
#include <QSqlDatabase>
|
||||
#include <QFileInfo>
|
||||
#include "filesaveroptions.h"
|
||||
#include "pagedata.h"
|
||||
#include "filedata.h"
|
||||
#include "sqlitedbservice.h"
|
||||
@ -11,16 +12,21 @@ class FileSaver
|
||||
private:
|
||||
SqliteDbService *dbService;
|
||||
QStringList excludedPaths = Common::excludedPaths();
|
||||
FileSaverOptions fileSaverOptions;
|
||||
|
||||
public:
|
||||
FileSaver(SqliteDbService &dbService);
|
||||
SaveFileResult addFile(QString path);
|
||||
SaveFileResult updateFile(QString path);
|
||||
SaveFileResult saveFile(const QFileInfo &fileInfo);
|
||||
int processFiles(const QVector<QString> paths, std::function<SaveFileResult(QString path)> saverFunc,
|
||||
bool keepGoing, bool verbose);
|
||||
int addFiles(const QVector<QString> paths, bool keepGoing, bool verbose);
|
||||
int updateFiles(const QVector<QString> paths, bool keepGoing, bool verbose);
|
||||
int processFiles(const QVector<QString> paths, std::function<SaveFileResult(QString path)> saverFunc);
|
||||
int addFiles(const QVector<QString> paths);
|
||||
int updateFiles(const QVector<QString> paths);
|
||||
|
||||
void setFileSaverOptions(FileSaverOptions options)
|
||||
{
|
||||
this->fileSaverOptions = options;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // FILESAVER_H
|
||||
|
在新工单中引用
屏蔽一个用户