Vcs: Make submit editor setup a bit more compact

Change-Id: I14c4c51a456f7b3b04b79b63b476f89eb58d3ea0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2024-02-07 08:03:26 +01:00
parent 941ad80d60
commit 980605ecb0
11 changed files with 118 additions and 158 deletions

View File

@@ -134,13 +134,6 @@ public:
static const QVersionNumber minimumRequiredVersion{1, 9};
const VcsBaseSubmitEditorParameters submitParameters {
Git::Constants::SUBMIT_MIMETYPE,
Git::Constants::GITSUBMITEDITOR_ID,
Git::Constants::GITSUBMITEDITOR_DISPLAY_NAME,
VcsBaseSubmitEditorParameters::DiffRows
};
const VcsBaseEditorParameters svnLogEditorParameters {
OtherContent,
Git::Constants::GIT_SVN_LOG_EDITOR_ID,
@@ -410,12 +403,6 @@ public:
[] { return new GitEditorWidget; },
std::bind(&GitPluginPrivate::vcsDescribe, this, _1, _2)
};
VcsSubmitEditorFactory submitEditorFactory {
submitParameters,
[] { return new GitSubmitEditor; },
this
};
};
static GitPluginPrivate *dd = nullptr;
@@ -968,6 +955,14 @@ GitPluginPrivate::GitPluginPrivate()
connect(&settings(), &AspectContainer::applied, this, &GitPluginPrivate::onApplySettings);
m_instantBlame.setup();
setupVcsSubmitEditor(this, {
Git::Constants::SUBMIT_MIMETYPE,
Git::Constants::GITSUBMITEDITOR_ID,
Git::Constants::GITSUBMITEDITOR_DISPLAY_NAME,
VcsBaseSubmitEditorParameters::DiffRows,
[] { return new GitSubmitEditor; },
});
}
void GitPluginPrivate::diffCurrentFile()