Commit d1a8347e authored by hjk's avatar hjk

Vcs: Denoise *plugin.cpp and reduces scope of constants

Change-Id: If2eb34e8975cca46a52c61d902b89a5f99c757a5
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 5ac407ee
......@@ -78,7 +78,39 @@ using namespace VcsBase;
namespace Bazaar {
namespace Internal {
static const VcsBaseEditorParameters editorParameters[] = {
// Submit editor parameters
const char COMMIT_ID[] = "Bazaar Commit Log Editor";
const char COMMIT_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Bazaar Commit Log Editor");
const char COMMITMIMETYPE[] = "text/vnd.qtcreator.bazaar.commit";
// Menu items
// File menu actions
const char ADD[] = "Bazaar.AddSingleFile";
const char DELETE[] = "Bazaar.DeleteSingleFile";
const char ANNOTATE[] = "Bazaar.Annotate";
const char DIFF[] = "Bazaar.DiffSingleFile";
const char LOG[] = "Bazaar.LogSingleFile";
const char REVERT[] = "Bazaar.RevertSingleFile";
const char STATUS[] = "Bazaar.Status";
// Directory menu Actions
const char DIFFMULTI[] = "Bazaar.Action.DiffMulti";
const char REVERTMULTI[] = "Bazaar.Action.RevertALL";
const char STATUSMULTI[] = "Bazaar.Action.StatusMulti";
const char LOGMULTI[] = "Bazaar.Action.Logmulti";
// Repository menu actions
const char PULL[] = "Bazaar.Action.Pull";
const char PUSH[] = "Bazaar.Action.Push";
const char UPDATE[] = "Bazaar.Action.Update";
const char COMMIT[] = "Bazaar.Action.Commit";
const char UNCOMMIT[] = "Bazaar.Action.UnCommit";
const char CREATE_REPOSITORY[] = "Bazaar.Action.CreateRepository";
// Submit editor actions
const char DIFFEDITOR[] = "Bazaar.Action.Editor.Diff";
const VcsBaseEditorParameters editorParameters[] = {
{ LogOutput, // type
Constants::FILELOG_ID, // id
Constants::FILELOG_DISPLAY_NAME, // display name
......@@ -98,11 +130,11 @@ static const VcsBaseEditorParameters editorParameters[] = {
Constants::DIFFAPP}
};
static const VcsBaseSubmitEditorParameters submitEditorParameters = {
Constants::COMMITMIMETYPE,
Constants::COMMIT_ID,
Constants::COMMIT_DISPLAY_NAME,
Constants::COMMIT_ID,
const VcsBaseSubmitEditorParameters submitEditorParameters = {
COMMITMIMETYPE,
COMMIT_ID,
COMMIT_DISPLAY_NAME,
COMMIT_ID,
VcsBaseSubmitEditorParameters::DiffFiles
};
......@@ -217,14 +249,14 @@ void BazaarPlugin::createFileActions(const Context &context)
Core::Command *command;
m_annotateFile = new ParameterAction(tr("Annotate Current File"), tr("Annotate \"%1\""), ParameterAction::EnabledWithParameter, this);
command = ActionManager::registerAction(m_annotateFile, Constants::ANNOTATE, context);
command = ActionManager::registerAction(m_annotateFile, ANNOTATE, context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_annotateFile, SIGNAL(triggered()), this, SLOT(annotateCurrentFile()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_diffFile = new ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this);
command = ActionManager::registerAction(m_diffFile, Constants::DIFF, context);
command = ActionManager::registerAction(m_diffFile, DIFF, context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Z,Meta+D") : tr("ALT+Z,Alt+D")));
connect(m_diffFile, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
......@@ -232,7 +264,7 @@ void BazaarPlugin::createFileActions(const Context &context)
m_commandLocator->appendCommand(command);
m_logFile = new ParameterAction(tr("Log Current File"), tr("Log \"%1\""), ParameterAction::EnabledWithParameter, this);
command = ActionManager::registerAction(m_logFile, Constants::LOG, context);
command = ActionManager::registerAction(m_logFile, LOG, context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Z,Meta+L") : tr("ALT+Z,Alt+L")));
connect(m_logFile, SIGNAL(triggered()), this, SLOT(logCurrentFile()));
......@@ -240,7 +272,7 @@ void BazaarPlugin::createFileActions(const Context &context)
m_commandLocator->appendCommand(command);
m_statusFile = new ParameterAction(tr("Status Current File"), tr("Status \"%1\""), ParameterAction::EnabledWithParameter, this);
command = ActionManager::registerAction(m_statusFile, Constants::STATUS, context);
command = ActionManager::registerAction(m_statusFile, STATUS, context);
command->setAttribute(Core::Command::CA_UpdateText);
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Z,Meta+S") : tr("ALT+Z,Alt+S")));
connect(m_statusFile, SIGNAL(triggered()), this, SLOT(statusCurrentFile()));
......@@ -250,21 +282,21 @@ void BazaarPlugin::createFileActions(const Context &context)
m_bazaarContainer->addSeparator(context);
m_addAction = new ParameterAction(tr("Add"), tr("Add \"%1\""), ParameterAction::EnabledWithParameter, this);
command = ActionManager::registerAction(m_addAction, Constants::ADD, context);
command = ActionManager::registerAction(m_addAction, ADD, context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_deleteAction = new ParameterAction(tr("Delete..."), tr("Delete \"%1\"..."), ParameterAction::EnabledWithParameter, this);
command = ActionManager::registerAction(m_deleteAction, Constants::DELETE, context);
command = ActionManager::registerAction(m_deleteAction, DELETE, context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(promptToDeleteCurrentFile()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
m_revertFile = new ParameterAction(tr("Revert Current File..."), tr("Revert \"%1\"..."), ParameterAction::EnabledWithParameter, this);
command = ActionManager::registerAction(m_revertFile, Constants::REVERT, context);
command = ActionManager::registerAction(m_revertFile, REVERT, context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_revertFile, SIGNAL(triggered()), this, SLOT(revertCurrentFile()));
m_bazaarContainer->addAction(command);
......@@ -329,28 +361,28 @@ void BazaarPlugin::createDirectoryActions(const Context &context)
action = new QAction(tr("Diff"), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::DIFFMULTI, context);
command = ActionManager::registerAction(action, DIFFMULTI, context);
connect(action, SIGNAL(triggered()), this, SLOT(diffRepository()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
action = new QAction(tr("Log"), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::LOGMULTI, context);
command = ActionManager::registerAction(action, LOGMULTI, context);
connect(action, SIGNAL(triggered()), this, SLOT(logRepository()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
action = new QAction(tr("Revert..."), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::REVERTMULTI, context);
command = ActionManager::registerAction(action, REVERTMULTI, context);
connect(action, SIGNAL(triggered()), this, SLOT(revertAll()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
action = new QAction(tr("Status"), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::STATUSMULTI, context);
command = ActionManager::registerAction(action, STATUSMULTI, context);
connect(action, SIGNAL(triggered()), this, SLOT(statusMulti()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
......@@ -400,28 +432,28 @@ void BazaarPlugin::createRepositoryActions(const Context &context)
action = new QAction(tr("Pull..."), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::PULL, context);
command = ActionManager::registerAction(action, PULL, context);
connect(action, SIGNAL(triggered()), this, SLOT(pull()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
action = new QAction(tr("Push..."), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::PUSH, context);
command = ActionManager::registerAction(action, PUSH, context);
connect(action, SIGNAL(triggered()), this, SLOT(push()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
action = new QAction(tr("Update..."), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::UPDATE, context);
command = ActionManager::registerAction(action, UPDATE, context);
connect(action, SIGNAL(triggered()), this, SLOT(update()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
action = new QAction(tr("Commit..."), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::COMMIT, context);
command = ActionManager::registerAction(action, COMMIT, context);
command->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+Z,Meta+C") : tr("ALT+Z,Alt+C")));
connect(action, SIGNAL(triggered()), this, SLOT(commit()));
m_bazaarContainer->addAction(command);
......@@ -429,13 +461,13 @@ void BazaarPlugin::createRepositoryActions(const Context &context)
action = new QAction(tr("Uncommit..."), this);
m_repositoryActionList.append(action);
command = ActionManager::registerAction(action, Constants::UNCOMMIT, context);
command = ActionManager::registerAction(action, UNCOMMIT, context);
connect(action, SIGNAL(triggered()), this, SLOT(uncommit()));
m_bazaarContainer->addAction(command);
m_commandLocator->appendCommand(command);
QAction *createRepositoryAction = new QAction(tr("Create Repository..."), this);
command = ActionManager::registerAction(createRepositoryAction, Constants::CREATE_REPOSITORY, context);
command = ActionManager::registerAction(createRepositoryAction, CREATE_REPOSITORY, context);
connect(createRepositoryAction, SIGNAL(triggered()), this, SLOT(createRepository()));
m_bazaarContainer->addAction(command);
}
......@@ -498,16 +530,16 @@ void BazaarPlugin::update()
void BazaarPlugin::createSubmitEditorActions()
{
Context context(Constants::COMMIT_ID);
Context context(COMMIT_ID);
Core::Command *command;
m_editorCommit = new QAction(VcsBaseSubmitEditor::submitIcon(), tr("Commit"), this);
command = ActionManager::registerAction(m_editorCommit, Constants::COMMIT, context);
command = ActionManager::registerAction(m_editorCommit, COMMIT, context);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_editorCommit, SIGNAL(triggered()), this, SLOT(commitFromEditor()));
m_editorDiff = new QAction(VcsBaseSubmitEditor::diffIcon(), tr("Diff &Selected Files"), this);
command = ActionManager::registerAction(m_editorDiff, Constants::DIFFEDITOR, context);
command = ActionManager::registerAction(m_editorDiff, DIFFEDITOR, context);
m_editorUndo = new QAction(tr("&Undo"), this);
command = ActionManager::registerAction(m_editorUndo, Core::Constants::UNDO, context);
......@@ -553,7 +585,7 @@ void BazaarPlugin::showCommitWidget(const QList<VcsBaseClient::StatusItem> &stat
return;
}
IEditor *editor = EditorManager::openEditor(saver.fileName(), Constants::COMMIT_ID);
IEditor *editor = EditorManager::openEditor(saver.fileName(), COMMIT_ID);
if (!editor) {
outputWindow->appendError(tr("Unable to create an editor for the commit."));
return;
......@@ -688,7 +720,7 @@ bool BazaarPlugin::submitEditorAboutToClose()
QStringList files = commitEditor->checkedFiles();
if (!files.empty()) {
//save the commit message
if (!Core::DocumentManager::saveDocument(editorDocument))
if (!DocumentManager::saveDocument(editorDocument))
return false;
//rewrite entries of the form 'file => newfile' to 'newfile' because
......
......@@ -61,38 +61,6 @@ const char DIFFLOG_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Bazaar Diff Editor
const char DIFFLOG[] = "Bazaar Diff Editor";
const char DIFFAPP[] = "text/x-patch";
// Submit editor parameters
const char COMMIT_ID[] = "Bazaar Commit Log Editor";
const char COMMIT_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Bazaar Commit Log Editor");
const char COMMITMIMETYPE[] = "text/vnd.qtcreator.bazaar.commit";
// Menu items
// File menu actions
const char ADD[] = "Bazaar.AddSingleFile";
const char DELETE[] = "Bazaar.DeleteSingleFile";
const char ANNOTATE[] = "Bazaar.Annotate";
const char DIFF[] = "Bazaar.DiffSingleFile";
const char LOG[] = "Bazaar.LogSingleFile";
const char REVERT[] = "Bazaar.RevertSingleFile";
const char STATUS[] = "Bazaar.Status";
// Directory menu Actions
const char DIFFMULTI[] = "Bazaar.Action.DiffMulti";
const char REVERTMULTI[] = "Bazaar.Action.RevertALL";
const char STATUSMULTI[] = "Bazaar.Action.StatusMulti";
const char LOGMULTI[] = "Bazaar.Action.Logmulti";
// Repository menu actions
const char PULL[] = "Bazaar.Action.Pull";
const char PUSH[] = "Bazaar.Action.Push";
const char UPDATE[] = "Bazaar.Action.Update";
const char COMMIT[] = "Bazaar.Action.Commit";
const char UNCOMMIT[] = "Bazaar.Action.UnCommit";
const char CREATE_REPOSITORY[] = "Bazaar.Action.CreateRepository";
// Submit editor actions
const char DIFFEDITOR[] = "Bazaar.Action.Editor.Diff";
} // namespace Constants
} // namespace Bazaar
......
......@@ -33,12 +33,6 @@
namespace Cvs {
namespace Constants {
const char CVS_SUBMIT_MIMETYPE[] = "text/vnd.qtcreator.cvs.submit";
const char CVSCOMMITEDITOR[] = "CVS Commit Editor";
const char CVSCOMMITEDITOR_ID[] = "CVS Commit Editor";
const char CVSCOMMITEDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "CVS Commit Editor");
const char SUBMIT_CURRENT[] = "CVS.SubmitCurrentLog";
const char DIFF_SELECTED[] = "CVS.DiffSelectedFilesInLog";
enum { debug = 0 };
} // namespace Constants
......
This diff is collapsed.
......@@ -35,26 +35,6 @@
namespace Perforce {
namespace Constants {
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 char SUBMIT_CURRENT[] = "Perforce.SubmitCurrentLog";
const char DIFF_SELECTED[] = "Perforce.DiffSelectedFilesInLog";
const char SUBMIT_MIMETYPE[] = "text/vnd.qtcreator.p4.submit";
enum { debug = 0 };
} // Constants
......
This diff is collapsed.
......@@ -35,12 +35,6 @@
namespace Subversion {
namespace Constants {
const char SUBVERSION_SUBMIT_MIMETYPE[] = "text/vnd.qtcreator.svn.submit";
const char SUBVERSIONCOMMITEDITOR[] = "Subversion Commit Editor";
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 char NON_INTERACTIVE_OPTION[] = "--non-interactive";
enum { debug = 0 };
......
......@@ -44,25 +44,24 @@
#include <vcsbase/basevcssubmiteditorfactory.h>
#include <vcsbase/vcsbaseoutputwindow.h>
#include <vcsbase/vcsbaseeditorparameterwidget.h>
#include <utils/synchronousprocess.h>
#include <utils/parameteraction.h>
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/mimedatabase.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/id.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/id.h>
#include <coreplugin/locator/commandlocator.h>
#include <coreplugin/messagemanager.h>
#include <coreplugin/mimedatabase.h>
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/parameteraction.h>
#include <utils/qtcassert.h>
#include <utils/synchronousprocess.h>
#include <QDebug>
#include <QDir>
......@@ -77,6 +76,7 @@
#include <QMenu>
#include <QMessageBox>
#include <QInputDialog>
#include <limits.h>
#ifdef WITH_TESTS
......@@ -90,32 +90,35 @@ using namespace VcsBase;
namespace Subversion {
namespace Internal {
static const char CMD_ID_SUBVERSION_MENU[] = "Subversion.Menu";
static const char CMD_ID_ADD[] = "Subversion.Add";
static const char CMD_ID_DELETE_FILE[] = "Subversion.Delete";
static const char CMD_ID_REVERT[] = "Subversion.Revert";
static const char CMD_ID_DIFF_PROJECT[] = "Subversion.DiffAll";
static const char CMD_ID_DIFF_CURRENT[] = "Subversion.DiffCurrent";
static const char CMD_ID_COMMIT_ALL[] = "Subversion.CommitAll";
static const char CMD_ID_REVERT_ALL[] = "Subversion.RevertAll";
static const char CMD_ID_COMMIT_CURRENT[] = "Subversion.CommitCurrent";
static const char CMD_ID_FILELOG_CURRENT[] = "Subversion.FilelogCurrent";
static const char CMD_ID_ANNOTATE_CURRENT[] = "Subversion.AnnotateCurrent";
static const char CMD_ID_STATUS[] = "Subversion.Status";
static const char CMD_ID_PROJECTLOG[] = "Subversion.ProjectLog";
static const char CMD_ID_REPOSITORYLOG[] = "Subversion.RepositoryLog";
static const char CMD_ID_REPOSITORYUPDATE[] = "Subversion.RepositoryUpdate";
static const char CMD_ID_REPOSITORYDIFF[] = "Subversion.RepositoryDiff";
static const char CMD_ID_REPOSITORYSTATUS[] = "Subversion.RepositoryStatus";
static const char CMD_ID_UPDATE[] = "Subversion.Update";
static const char CMD_ID_COMMIT_PROJECT[] = "Subversion.CommitProject";
static const char CMD_ID_DESCRIBE[] = "Subversion.Describe";
static const char nonInteractiveOptionC[] = "--non-interactive";
static const VcsBaseEditorParameters editorParameters[] = {
const char CMD_ID_SUBVERSION_MENU[] = "Subversion.Menu";
const char CMD_ID_ADD[] = "Subversion.Add";
const char CMD_ID_DELETE_FILE[] = "Subversion.Delete";
const char CMD_ID_REVERT[] = "Subversion.Revert";
const char CMD_ID_DIFF_PROJECT[] = "Subversion.DiffAll";
const char CMD_ID_DIFF_CURRENT[] = "Subversion.DiffCurrent";
const char CMD_ID_COMMIT_ALL[] = "Subversion.CommitAll";
const char CMD_ID_REVERT_ALL[] = "Subversion.RevertAll";
const char CMD_ID_COMMIT_CURRENT[] = "Subversion.CommitCurrent";
const char CMD_ID_FILELOG_CURRENT[] = "Subversion.FilelogCurrent";
const char CMD_ID_ANNOTATE_CURRENT[] = "Subversion.AnnotateCurrent";
const char CMD_ID_STATUS[] = "Subversion.Status";
const char CMD_ID_PROJECTLOG[] = "Subversion.ProjectLog";
const char CMD_ID_REPOSITORYLOG[] = "Subversion.RepositoryLog";
const char CMD_ID_REPOSITORYUPDATE[] = "Subversion.RepositoryUpdate";
const char CMD_ID_REPOSITORYDIFF[] = "Subversion.RepositoryDiff";
const char CMD_ID_REPOSITORYSTATUS[] = "Subversion.RepositoryStatus";
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[] = "Subversion Commit Editor";
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
......@@ -234,10 +237,10 @@ bool SubversionPlugin::isCommitEditorOpen() const
}
const VcsBaseSubmitEditorParameters submitParameters = {
Subversion::Constants::SUBVERSION_SUBMIT_MIMETYPE,
Subversion::Constants::SUBVERSIONCOMMITEDITOR_ID,
Subversion::Constants::SUBVERSIONCOMMITEDITOR_DISPLAY_NAME,
Subversion::Constants::SUBVERSIONCOMMITEDITOR,
SUBVERSION_SUBMIT_MIMETYPE,
SUBVERSIONCOMMITEDITOR_ID,
SUBVERSIONCOMMITEDITOR_DISPLAY_NAME,
SUBVERSIONCOMMITEDITOR,
VcsBaseSubmitEditorParameters::DiffFiles
};
......@@ -433,15 +436,15 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e
m_commandLocator->appendCommand(command);
// Actions of the submit editor
Context svncommitcontext(Constants::SUBVERSIONCOMMITEDITOR);
Context svncommitcontext(SUBVERSIONCOMMITEDITOR);
m_submitCurrentLogAction = new QAction(VcsBaseSubmitEditor::submitIcon(), tr("Commit"), this);
command = ActionManager::registerAction(m_submitCurrentLogAction, Constants::SUBMIT_CURRENT, svncommitcontext);
command = ActionManager::registerAction(m_submitCurrentLogAction, SUBMIT_CURRENT, svncommitcontext);
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_submitCurrentLogAction, SIGNAL(triggered()), this, SLOT(submitCurrentLog()));
m_submitDiffAction = new QAction(VcsBaseSubmitEditor::diffIcon(), tr("Diff &Selected Files"), this);
command = ActionManager::registerAction(m_submitDiffAction , Constants::DIFF_SELECTED, svncommitcontext);
command = ActionManager::registerAction(m_submitDiffAction , DIFF_SELECTED, svncommitcontext);
m_submitUndoAction = new QAction(tr("&Undo"), this);
command = ActionManager::registerAction(m_submitUndoAction, Core::Constants::UNDO, svncommitcontext);
......@@ -513,7 +516,7 @@ void SubversionPlugin::diffCommitFiles(const QStringList &files)
SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QString &fileName)
{
IEditor *editor = EditorManager::openEditor(fileName, Constants::SUBVERSIONCOMMITEDITOR_ID);
IEditor *editor = EditorManager::openEditor(fileName, SUBVERSIONCOMMITEDITOR_ID);
SubversionSubmitEditor *submitEditor = qobject_cast<SubversionSubmitEditor*>(editor);
QTC_ASSERT(submitEditor, return 0);
setSubmitEditor(submitEditor);
......@@ -714,7 +717,7 @@ bool SubversionPlugin::commit(const QString &messageFile,
// "[ADM]<blanks>file" into an args list. The files of the status log
// can be relative or absolute depending on where the command was run.
QStringList args = QStringList(QLatin1String("commit"));
args << QLatin1String(nonInteractiveOptionC) << QLatin1String("--file") << messageFile;
args << QLatin1String(Constants::NON_INTERACTIVE_OPTION) << QLatin1String("--file") << messageFile;
args.append(subVersionFileList);
const SubversionResponse response =
runSvn(m_commitRepository, args, 10 * m_settings.timeOutMs(),
......@@ -828,7 +831,7 @@ void SubversionPlugin::updateProject()
void SubversionPlugin::svnUpdate(const QString &workingDir, const QString &relativePath)
{
QStringList args(QLatin1String("update"));
args.push_back(QLatin1String(nonInteractiveOptionC));
args.push_back(QLatin1String(Constants::NON_INTERACTIVE_OPTION));
if (!relativePath.isEmpty())
args.append(relativePath);
const SubversionResponse response =
......@@ -1108,7 +1111,7 @@ bool SubversionPlugin::vcsCheckout(const QString &directory, const QByteArray &u
QString username = tempUrl.userName();
QString password = tempUrl.password();
QStringList args = QStringList(QLatin1String("checkout"));
args << QLatin1String(nonInteractiveOptionC) ;
args << QLatin1String(Constants::NON_INTERACTIVE_OPTION) ;
if (!username.isEmpty() && !password.isEmpty()) {
// If url contains username and password we have to use separate username and password
......
......@@ -43,13 +43,10 @@ QT_END_NAMESPACE
namespace Core {
class CommandLocator;
class IVersionControl;
class IEditor;
}
namespace Utils { class ParameterAction; }
namespace VcsBase { class VcsBaseSubmitEditor; }
namespace Subversion {
namespace Internal {
......
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