Commit 520c16b4 authored by Hugues Delorme's avatar Hugues Delorme

Svn: move common constants in subversionconstants.h

Change-Id: Ib97a2ee90a4ed4dc2740654f1e210f4dcc9579cf
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent e4b48265
......@@ -39,7 +39,24 @@ namespace Constants {
const char NON_INTERACTIVE_OPTION[] = "--non-interactive";
enum { debug = 0 };
const char SUBVERSION_CONTEXT[] = "Subversion Context";
const char SUBVERSION_COMMIT_EDITOR_ID[] = "Subversion Commit Editor";
const char SUBVERSION_COMMIT_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Subversion Commit Editor");
const char SUBVERSION_SUBMIT_MIMETYPE[] = "text/vnd.qtcreator.svn.submit";
const char SUBVERSION_LOG_EDITOR_ID[] = "Subversion File Log Editor";
const char SUBVERSION_LOG_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Subversion File Log Editor");
const char SUBVERSION_LOG_MIMETYPE[] = "text/vnd.qtcreator.svn.log";
const char SUBVERSION_BLAME_EDITOR_ID[] = "Subversion Annotation Editor";
const char SUBVERSION_BLAME_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Subversion Annotation Editor");
const char SUBVERSION_BLAME_MIMETYPE[] = "text/vnd.qtcreator.svn.annotation";
const char SUBMIT_CURRENT[] = "Subversion.SubmitCurrentLog";
const char DIFF_SELECTED[] = "Subversion.DiffSelectedFilesInLog";
} // namespace Constants
} // namespace SubVersion
} // namespace Subversion
#endif // SUBVERSION_CONSTANTS_H
......@@ -92,7 +92,6 @@ using namespace VcsBase;
namespace Subversion {
namespace Internal {
const char SUBVERSION_CONTEXT[] = "Subversion Context";
const char CMD_ID_SUBVERSION_MENU[] = "Subversion.Menu";
const char CMD_ID_ADD[] = "Subversion.Add";
const char CMD_ID_DELETE_FILE[] = "Subversion.Delete";
......@@ -114,22 +113,16 @@ const char CMD_ID_UPDATE[] = "Subversion.Update";
const char CMD_ID_COMMIT_PROJECT[] = "Subversion.CommitProject";
const char CMD_ID_DESCRIBE[] = "Subversion.Describe";
const char SUBVERSION_SUBMIT_MIMETYPE[] = "text/vnd.qtcreator.svn.submit";
const char SUBVERSIONCOMMITEDITOR_ID[] = "Subversion Commit Editor";
const char SUBVERSIONCOMMITEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Subversion Commit Editor");
const char SUBMIT_CURRENT[] = "Subversion.SubmitCurrentLog";
const char DIFF_SELECTED[] = "Subversion.DiffSelectedFilesInLog";
const VcsBaseEditorParameters editorParameters[] = {
{
LogOutput,
"Subversion File Log Editor", // id
QT_TRANSLATE_NOOP("VCS", "Subversion File Log Editor"), // display_name
"text/vnd.qtcreator.svn.log"},
Constants::SUBVERSION_LOG_EDITOR_ID,
Constants::SUBVERSION_LOG_EDITOR_DISPLAY_NAME,
Constants::SUBVERSION_LOG_MIMETYPE},
{ AnnotateOutput,
"Subversion Annotation Editor", // id
QT_TRANSLATE_NOOP("VCS", "Subversion Annotation Editor"), // display_name
"text/vnd.qtcreator.svn.annotation"}
Constants::SUBVERSION_BLAME_EDITOR_ID,
Constants::SUBVERSION_BLAME_EDITOR_DISPLAY_NAME,
Constants::SUBVERSION_BLAME_MIMETYPE}
};
// Utility to find a parameter set by type
......@@ -232,9 +225,9 @@ bool SubversionPlugin::isCommitEditorOpen() const
}
const VcsBaseSubmitEditorParameters submitParameters = {
SUBVERSION_SUBMIT_MIMETYPE,
SUBVERSIONCOMMITEDITOR_ID,
SUBVERSIONCOMMITEDITOR_DISPLAY_NAME,
Constants::SUBVERSION_SUBMIT_MIMETYPE,
Constants::SUBVERSION_COMMIT_EDITOR_ID,
Constants::SUBVERSION_COMMIT_EDITOR_DISPLAY_NAME,
VcsBaseSubmitEditorParameters::DiffFiles
};
......@@ -437,7 +430,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e
m_commandLocator->appendCommand(command);
// Actions of the submit editor
Context svncommitcontext(SUBVERSIONCOMMITEDITOR_ID);
Context svncommitcontext(Constants::SUBVERSION_COMMIT_EDITOR_ID);
m_submitCurrentLogAction = new QAction(VcsBaseSubmitEditor::submitIcon(), tr("Commit"), this);
command = ActionManager::registerAction(m_submitCurrentLogAction, SUBMIT_CURRENT, svncommitcontext);
......@@ -517,7 +510,7 @@ void SubversionPlugin::diffCommitFiles(const QStringList &files)
SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QString &fileName)
{
IEditor *editor = EditorManager::openEditor(fileName, SUBVERSIONCOMMITEDITOR_ID);
IEditor *editor = EditorManager::openEditor(fileName, Constants::SUBVERSION_COMMIT_EDITOR_ID);
SubversionSubmitEditor *submitEditor = qobject_cast<SubversionSubmitEditor*>(editor);
QTC_ASSERT(submitEditor, return 0);
setSubmitEditor(submitEditor);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment