Rework failed task cleanup

Now the cleanup of failed tasks (deletion of borked files) is handled by the related task itself, instead of the frontend.
This commit is contained in:
Pengfei
2021-07-12 11:47:42 +08:00
parent 23226b2b37
commit 6fbbae7039
5 changed files with 38 additions and 40 deletions
+1 -3
View File
@@ -16,12 +16,11 @@ class MultiJob : public QThread {
public:
using ExecuteFunc = std::function<bool(Core::SDMCImporter&, const Core::ContentSpecifier&,
const Common::ProgressCallback&)>;
using DeleteFunc = std::function<void(Core::SDMCImporter&, const Core::ContentSpecifier&)>;
using AbortFunc = std::function<void(Core::SDMCImporter&)>;
explicit MultiJob(QObject* parent, Core::SDMCImporter& importer,
std::vector<Core::ContentSpecifier> contents, ExecuteFunc execute_func,
DeleteFunc delete_func, AbortFunc abort_func);
AbortFunc abort_func);
~MultiJob() override;
void run() override;
@@ -50,7 +49,6 @@ private:
std::vector<Core::ContentSpecifier> contents;
std::vector<Core::ContentSpecifier> failed_contents;
ExecuteFunc execute_func;
DeleteFunc delete_func;
AbortFunc abort_func;
};