aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cvs
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2024-02-07 08:03:26 +0100
committerhjk <hjk@qt.io>2024-02-07 07:53:48 +0000
commit980605ecb0df12b2fd48154db1d5487131a82c4a (patch)
tree5a87410af48741cc69ce85dabed7d2294e0856a0 /src/plugins/cvs
parent941ad80d60f75fc13aa4c350b3709f45f3ac9901 (diff)
Vcs: Make submit editor setup a bit more compact
Change-Id: I14c4c51a456f7b3b04b79b63b476f89eb58d3ea0 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cvs')
-rw-r--r--src/plugins/cvs/cvsplugin.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp
index b930616e299..658796e7e95 100644
--- a/src/plugins/cvs/cvsplugin.cpp
+++ b/src/plugins/cvs/cvsplugin.cpp
@@ -92,13 +92,6 @@ const char CVS_SUBMIT_MIMETYPE[] = "text/vnd.qtcreator.cvs.submit";
const char CVSCOMMITEDITOR_ID[] = "CVS Commit Editor";
const char CVSCOMMITEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::VcsBase", "CVS Commit Editor");
-const VcsBaseSubmitEditorParameters submitParameters {
- CVS_SUBMIT_MIMETYPE,
- CVSCOMMITEDITOR_ID,
- CVSCOMMITEDITOR_DISPLAY_NAME,
- VcsBaseSubmitEditorParameters::DiffFiles
-};
-
const VcsBaseEditorParameters commandLogEditorParameters {
OtherContent,
"CVS Command Log Editor", // id
@@ -321,12 +314,6 @@ private:
QAction *m_menuAction = nullptr;
public:
- VcsSubmitEditorFactory submitEditorFactory {
- submitParameters,
- [] { return new CvsSubmitEditor; },
- this
- };
-
VcsEditorFactory commandLogEditorFactory {
&commandLogEditorParameters,
[] { return new CvsEditorWidget; },
@@ -472,6 +459,14 @@ CvsPluginPrivate::CvsPluginPrivate()
using namespace Core::Constants;
dd = this;
+ setupVcsSubmitEditor(this, {
+ CVS_SUBMIT_MIMETYPE,
+ CVSCOMMITEDITOR_ID,
+ CVSCOMMITEDITOR_DISPLAY_NAME,
+ VcsBaseSubmitEditorParameters::DiffFiles,
+ [] { return new CvsSubmitEditor; },
+ });
+
Context context(CVS_CONTEXT);
m_client = new CvsClient;