Vcs: Move responsibility to set editor parameters to editor factory

So it doesn't need to be named twice in the editor factory setup.

This intentially includes a de-optimiztion: storing the parameters
by value, not by pointer. That's more natural, does not need to
keep the parameters alive on the caller side, and it's uncritical
in this context.

Change-Id: I92867d3f2f75c38911ae82d3eeb4759cba71b723
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2020-02-05 09:27:26 +01:00
parent c17767c78e
commit 7f37c503db
27 changed files with 66 additions and 70 deletions

View File

@@ -98,8 +98,8 @@ CommitDataFetchResult CommitDataFetchResult::fetch(CommitType commitType, const
* option for staged files. So, we sort apart the diff file lists
* according to a type flag we add to the model. */
GitSubmitEditor::GitSubmitEditor(const VcsBaseSubmitEditorParameters *parameters) :
VcsBaseSubmitEditor(parameters, new GitSubmitEditorWidget)
GitSubmitEditor::GitSubmitEditor() :
VcsBaseSubmitEditor(new GitSubmitEditorWidget)
{
connect(this, &VcsBaseSubmitEditor::diffSelectedRows, this, &GitSubmitEditor::slotDiffSelected);
connect(submitEditorWidget(), &GitSubmitEditorWidget::show, this, &GitSubmitEditor::showCommit);