diff options
author | Eike Ziller <eike.ziller@digia.com> | 2014-09-02 12:25:20 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-09-02 16:48:13 +0200 |
commit | 7224ccb2e7bab5b7bca88cbcd41829fdf3c25165 (patch) | |
tree | 6c3bc438bf4e68ce06cf5afd8950d235b0bd391e /src/plugins/perforce | |
parent | cae737e6291d8349602cd9bd2e109abd0292e5af (diff) | |
download | qt-creator-7224ccb2e7bab5b7bca88cbcd41829fdf3c25165.tar.gz |
Editors: Automatically add editor/document id to context and use that
instead of manually adding a context everywhere.
Change-Id: I4336015a6d19349171a255e949da89b0013d6700
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/perforce')
-rw-r--r-- | src/plugins/perforce/perforceplugin.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 206e822c8a..59c22ea1f7 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -84,36 +84,29 @@ const char SUBMIT_MIMETYPE[] = "text/vnd.qtcreator.p4.submit"; const char PERFORCE_SUBMIT_EDITOR_ID[] = "Perforce.SubmitEditor"; const char PERFORCE_SUBMIT_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Perforce.SubmitEditor"); -const char PERFORCESUBMITEDITOR_CONTEXT[] = "Perforce Submit Editor"; const char PERFORCE_LOG_EDITOR_ID[] = "Perforce.LogEditor"; const char PERFORCE_LOG_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Perforce Log Editor"); -const char PERFORCE_LOG_EDITOR_CONTEXT[] = "Perforce Log Editor"; const char PERFORCE_DIFF_EDITOR_ID[] = "Perforce.DiffEditor"; const char PERFORCE_DIFF_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Perforce Diff Editor"); -const char PERFORCE_DIFF_EDITOR_CONTEXT[] = "Perforce Diff Editor"; const char PERFORCE_ANNOTATION_EDITOR_ID[] = "Perforce.AnnotationEditor"; const char PERFORCE_ANNOTATION_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Perforce Annotation Editor"); -const char PERFORCE_ANNOTATION_EDITOR_CONTEXT[] = "Perforce Annotation Editor"; const VcsBaseEditorParameters editorParameters[] = { { VcsBase::LogOutput, PERFORCE_LOG_EDITOR_ID, PERFORCE_LOG_EDITOR_DISPLAY_NAME, - PERFORCE_LOG_EDITOR_CONTEXT, "text/vnd.qtcreator.p4.log"}, { VcsBase::AnnotateOutput, PERFORCE_ANNOTATION_EDITOR_ID, PERFORCE_ANNOTATION_EDITOR_DISPLAY_NAME, - PERFORCE_ANNOTATION_EDITOR_CONTEXT, "text/vnd.qtcreator.p4.annotation"}, { VcsBase::DiffOutput, PERFORCE_DIFF_EDITOR_ID, PERFORCE_DIFF_EDITOR_DISPLAY_NAME, - PERFORCE_DIFF_EDITOR_CONTEXT, "text/x-patch"} }; @@ -221,7 +214,6 @@ static const VcsBaseSubmitEditorParameters submitParameters = { SUBMIT_MIMETYPE, PERFORCE_SUBMIT_EDITOR_ID, PERFORCE_SUBMIT_EDITOR_DISPLAY_NAME, - PERFORCESUBMITEDITOR_CONTEXT, VcsBaseSubmitEditorParameters::DiffFiles }; @@ -259,7 +251,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er m_menuAction = mperforce->menu()->menuAction(); Context globalcontext(Core::Constants::C_GLOBAL); - Context perforcesubmitcontext(PERFORCESUBMITEDITOR_CONTEXT); + Context perforcesubmitcontext(PERFORCE_SUBMIT_EDITOR_ID); Core::Command *command; |