VcsBaseDiffEditorController: Get rid of inputStorage() method

Pass explicitly the storage to the postProcessTask() instead.

Change-Id: I75ac10969530dfea1eac266b44481be3b1d8249b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2023-08-02 20:12:04 +02:00
parent d060d1b224
commit 6845434f3d
5 changed files with 14 additions and 24 deletions

View File

@@ -238,7 +238,7 @@ GitDiffEditorController::GitDiffEditorController(IDocument *document,
{
using namespace Tasking;
const TreeStorage<QString> diffInputStorage = inputStorage();
const TreeStorage<QString> diffInputStorage;
const auto setupDiff = [=](Process &process) {
process.setCodec(VcsBaseEditor::getCodec(workingDirectory(), {}));
@@ -252,7 +252,7 @@ GitDiffEditorController::GitDiffEditorController(IDocument *document,
const Group root {
Storage(diffInputStorage),
ProcessTask(setupDiff, onDiffDone),
postProcessTask()
postProcessTask(diffInputStorage)
};
setReloadRecipe(root);
}
@@ -304,7 +304,7 @@ FileListDiffController::FileListDiffController(IDocument *document, const QStrin
};
const TreeStorage<DiffStorage> storage;
const TreeStorage<QString> diffInputStorage = inputStorage();
const TreeStorage<QString> diffInputStorage;
const auto setupStaged = [this, stagedFiles](Process &process) {
if (stagedFiles.isEmpty())
@@ -346,7 +346,7 @@ FileListDiffController::FileListDiffController(IDocument *document, const QStrin
ProcessTask(setupUnstaged, onUnstagedDone),
onGroupDone(onStagingDone)
},
postProcessTask()
postProcessTask(diffInputStorage)
};
setReloadRecipe(root);
}
@@ -377,7 +377,7 @@ ShowController::ShowController(IDocument *document, const QString &id)
};
const TreeStorage<ReloadStorage> storage;
const TreeStorage<QString> diffInputStorage = inputStorage();
const TreeStorage<QString> diffInputStorage;
const auto updateDescription = [this](const ReloadStorage &storage) {
QString desc = storage.m_header;
@@ -552,7 +552,7 @@ ShowController::ShowController(IDocument *document, const QString &id)
},
Group {
ProcessTask(setupDiff, onDiffDone),
postProcessTask()
postProcessTask(diffInputStorage)
}
};
setReloadRecipe(root);