forked from qt-creator/qt-creator
more Id type fixes
Change-Id: I3720946ba5485696822976567d83b4d6cb1fb283 x Change-Id: Iab58bc34bc56371405d132315573b484a533b77c Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -194,7 +194,7 @@ static Core::Command *createSeparator(Core::ActionManager *am,
|
||||
ParameterActionCommandPair
|
||||
GitPlugin::createParameterAction(Core::ActionManager *am, Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const QString &id, const Core::Context &context,
|
||||
const Core::Id &id, const Core::Context &context,
|
||||
bool addToLocator)
|
||||
{
|
||||
Utils::ParameterAction *action = new Utils::ParameterAction(defaultText, parameterText,
|
||||
@@ -212,7 +212,7 @@ ParameterActionCommandPair
|
||||
ParameterActionCommandPair
|
||||
GitPlugin::createFileAction(Core::ActionManager *am, Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const QString &id, const Core::Context &context, bool addToLocator,
|
||||
const Core::Id &id, const Core::Context &context, bool addToLocator,
|
||||
const char *pluginSlot)
|
||||
{
|
||||
const ParameterActionCommandPair rc = createParameterAction(am, ac, defaultText, parameterText, id, context, addToLocator);
|
||||
@@ -225,7 +225,7 @@ ParameterActionCommandPair
|
||||
ParameterActionCommandPair
|
||||
GitPlugin::createProjectAction(Core::ActionManager *am, Core::ActionContainer *ac,
|
||||
const QString &defaultText, const QString ¶meterText,
|
||||
const QString &id, const Core::Context &context, bool addToLocator,
|
||||
const Core::Id &id, const Core::Context &context, bool addToLocator,
|
||||
const char *pluginSlot)
|
||||
{
|
||||
const ParameterActionCommandPair rc = createParameterAction(am, ac, defaultText, parameterText, id, context, addToLocator);
|
||||
@@ -237,7 +237,7 @@ ParameterActionCommandPair
|
||||
// Create an action to act on the repository
|
||||
ActionCommandPair
|
||||
GitPlugin::createRepositoryAction(Core::ActionManager *am, Core::ActionContainer *ac,
|
||||
const QString &text, const QString &id,
|
||||
const QString &text, const Core::Id &id,
|
||||
const Core::Context &context, bool addToLocator)
|
||||
{
|
||||
QAction *action = new QAction(text, this);
|
||||
@@ -252,7 +252,7 @@ ActionCommandPair
|
||||
// Create an action to act on the repository with slot
|
||||
ActionCommandPair
|
||||
GitPlugin::createRepositoryAction(Core::ActionManager *am, Core::ActionContainer *ac,
|
||||
const QString &text, const QString &id,
|
||||
const QString &text, const Core::Id &id,
|
||||
const Core::Context &context, bool addToLocator,
|
||||
const char *pluginSlot)
|
||||
{
|
||||
@@ -265,7 +265,7 @@ ActionCommandPair
|
||||
// taking the directory. Store the member function as data on the action.
|
||||
ActionCommandPair
|
||||
GitPlugin::createRepositoryAction(Core::ActionManager *am, Core::ActionContainer *ac,
|
||||
const QString &text, const QString &id,
|
||||
const QString &text, const Core::Id &id,
|
||||
const Core::Context &context, bool addToLocator,
|
||||
GitClientMemberFunc func)
|
||||
{
|
||||
@@ -317,8 +317,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
Core::ActionContainer *toolsContainer =
|
||||
actionManager->actionContainer(Core::Constants::M_TOOLS);
|
||||
|
||||
Core::ActionContainer *gitContainer =
|
||||
actionManager->createMenu(description);
|
||||
Core::ActionContainer *gitContainer = actionManager->createMenu("Git");
|
||||
gitContainer->menu()->setTitle(tr("&Git"));
|
||||
toolsContainer->addMenu(gitContainer);
|
||||
m_menuAction = gitContainer->menu()->menuAction();
|
||||
@@ -326,21 +325,21 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
ParameterActionCommandPair parameterActionCommand
|
||||
= createFileAction(actionManager, gitContainer,
|
||||
tr("Blame Current File"), tr("Blame for \"%1\""),
|
||||
QLatin1String("Git.Blame"),
|
||||
Core::Id("Git.Blame"),
|
||||
globalcontext, true, SLOT(blameFile()));
|
||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B")));
|
||||
|
||||
parameterActionCommand
|
||||
= createFileAction(actionManager, gitContainer,
|
||||
tr("Diff Current File"), tr("Diff of \"%1\""),
|
||||
QLatin1String("Git.Diff"), globalcontext, true,
|
||||
Core::Id("Git.Diff"), globalcontext, true,
|
||||
SLOT(diffCurrentFile()));
|
||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+D")));
|
||||
|
||||
parameterActionCommand
|
||||
= createFileAction(actionManager, gitContainer,
|
||||
tr("Log Current File"), tr("Log of \"%1\""),
|
||||
QLatin1String("Git.Log"), globalcontext, true, SLOT(logFile()));
|
||||
Core::Id("Git.Log"), globalcontext, true, SLOT(logFile()));
|
||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L")));
|
||||
|
||||
|
||||
@@ -350,24 +349,24 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
parameterActionCommand
|
||||
= createFileAction(actionManager, gitContainer,
|
||||
tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"),
|
||||
QLatin1String("Git.Stage"), globalcontext, true, SLOT(stageFile()));
|
||||
Core::Id("Git.Stage"), globalcontext, true, SLOT(stageFile()));
|
||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A")));
|
||||
|
||||
parameterActionCommand
|
||||
= createFileAction(actionManager, gitContainer,
|
||||
tr("Unstage File from Commit"), tr("Unstage \"%1\" from Commit"),
|
||||
QLatin1String("Git.Unstage"), globalcontext, true, SLOT(unstageFile()));
|
||||
Core::Id("Git.Unstage"), globalcontext, true, SLOT(unstageFile()));
|
||||
|
||||
parameterActionCommand
|
||||
= createFileAction(actionManager, gitContainer,
|
||||
tr("Undo Unstaged Changes"), tr("Undo Unstaged Changes for \"%1\""),
|
||||
QLatin1String("Git.UndoUnstaged"), globalcontext,
|
||||
Core::Id("Git.UndoUnstaged"), globalcontext,
|
||||
true, SLOT(undoUnstagedFileChanges()));
|
||||
|
||||
parameterActionCommand
|
||||
= createFileAction(actionManager, gitContainer,
|
||||
tr("Undo Uncommitted Changes"), tr("Undo Uncommitted Changes for \"%1\""),
|
||||
QLatin1String("Git.Undo"), globalcontext,
|
||||
Core::Id("Git.Undo"), globalcontext,
|
||||
true, SLOT(undoFileChanges()));
|
||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U")));
|
||||
|
||||
@@ -378,7 +377,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
parameterActionCommand
|
||||
= createProjectAction(actionManager, gitContainer,
|
||||
tr("Diff Current Project"), tr("Diff Project \"%1\""),
|
||||
QLatin1String("Git.DiffProject"),
|
||||
Core::Id("Git.DiffProject"),
|
||||
globalcontext, true,
|
||||
SLOT(diffCurrentProject()));
|
||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence("Alt+G,Alt+Shift+D"));
|
||||
@@ -386,14 +385,14 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
parameterActionCommand
|
||||
= createProjectAction(actionManager, gitContainer,
|
||||
tr("Log Project"), tr("Log Project \"%1\""),
|
||||
QLatin1String("Git.LogProject"), globalcontext, true,
|
||||
Core::Id("Git.LogProject"), globalcontext, true,
|
||||
SLOT(logProject()));
|
||||
parameterActionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K")));
|
||||
|
||||
parameterActionCommand
|
||||
= createProjectAction(actionManager, gitContainer,
|
||||
tr("Clean Project..."), tr("Clean Project \"%1\"..."),
|
||||
QLatin1String("Git.CleanProject"), globalcontext,
|
||||
Core::Id("Git.CleanProject"), globalcontext,
|
||||
true, SLOT(cleanProject()));
|
||||
|
||||
|
||||
@@ -401,24 +400,24 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
gitContainer->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.Repository"), this));
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Diff"), QLatin1String("Git.DiffRepository"),
|
||||
tr("Diff"), Core::Id("Git.DiffRepository"),
|
||||
globalcontext, true, SLOT(diffRepository()));
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Log"), QLatin1String("Git.LogRepository"),
|
||||
tr("Log"), Core::Id("Git.LogRepository"),
|
||||
globalcontext, true, &GitClient::graphLog);
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Status"), QLatin1String("Git.StatusRepository"),
|
||||
tr("Status"), Core::Id("Git.StatusRepository"),
|
||||
globalcontext, true, &GitClient::status);
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Undo Uncommited Changes..."), QLatin1String("Git.UndoRepository"),
|
||||
tr("Undo Uncommited Changes..."), Core::Id("Git.UndoRepository"),
|
||||
globalcontext, false, SLOT(undoRepositoryChanges()));
|
||||
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Clean..."), QLatin1String("Git.CleanRepository"),
|
||||
tr("Clean..."), Core::Id("Git.CleanRepository"),
|
||||
globalcontext, true, SLOT(cleanRepository()));
|
||||
|
||||
m_createRepositoryAction = new QAction(tr("Create Repository..."), this);
|
||||
@@ -430,15 +429,15 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
gitContainer->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.Info"), this));
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Launch gitk"), QLatin1String("Git.LaunchGitK"),
|
||||
tr("Launch gitk"), Core::Id("Git.LaunchGitK"),
|
||||
globalcontext, true, &GitClient::launchGitK);
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Branches..."), QLatin1String("Git.BranchList"),
|
||||
tr("Branches..."), Core::Id("Git.BranchList"),
|
||||
globalcontext, true, SLOT(branchList()));
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Remotes..."), QLatin1String("Git.RemoteList"),
|
||||
tr("Remotes..."), Core::Id("Git.RemoteList"),
|
||||
globalcontext, false, SLOT(remoteList()));
|
||||
|
||||
m_showAction = new QAction(tr("Show Commit..."), this);
|
||||
@@ -458,14 +457,14 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
parameterActionCommand =
|
||||
createParameterAction(actionManager, patchMenu,
|
||||
tr("Apply from Editor"), tr("Apply \"%1\""),
|
||||
QLatin1String("Git.ApplyCurrentFilePatch"),
|
||||
Core::Id("Git.ApplyCurrentFilePatch"),
|
||||
globalcontext, true);
|
||||
m_applyCurrentFilePatchAction = parameterActionCommand.first;
|
||||
connect(m_applyCurrentFilePatchAction, SIGNAL(triggered()), this,
|
||||
SLOT(applyCurrentFilePatch()));
|
||||
|
||||
createRepositoryAction(actionManager, patchMenu,
|
||||
tr("Apply from File..."), QLatin1String("Git.ApplyPatch"),
|
||||
tr("Apply from File..."), Core::Id("Git.ApplyPatch"),
|
||||
globalcontext, true, SLOT(promptApplyPatch()));
|
||||
|
||||
Core::ActionContainer *stashMenu = actionManager->createMenu(Core::Id("Git.StashMenu"));
|
||||
@@ -473,26 +472,26 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
gitContainer->addMenu(stashMenu);
|
||||
|
||||
createRepositoryAction(actionManager, stashMenu,
|
||||
tr("Stashes..."), QLatin1String("Git.StashList"),
|
||||
tr("Stashes..."), Core::Id("Git.StashList"),
|
||||
globalcontext, false, SLOT(stashList()));
|
||||
|
||||
stashMenu->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.StashMenuPush"), this));
|
||||
|
||||
ActionCommandPair actionCommand =
|
||||
createRepositoryAction(actionManager, stashMenu,
|
||||
tr("Stash"), QLatin1String("Git.Stash"),
|
||||
tr("Stash"), Core::Id("Git.Stash"),
|
||||
globalcontext, true, SLOT(stash()));
|
||||
actionCommand.first->setToolTip(tr("Saves the current state of your work and resets the repository."));
|
||||
|
||||
actionCommand = createRepositoryAction(actionManager, stashMenu,
|
||||
tr("Take Snapshot..."), QLatin1String("Git.StashSnapshot"),
|
||||
tr("Take Snapshot..."), Core::Id("Git.StashSnapshot"),
|
||||
globalcontext, true, SLOT(stashSnapshot()));
|
||||
actionCommand.first->setToolTip(tr("Saves the current state of your work."));
|
||||
|
||||
stashMenu->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.StashMenuPop"), this));
|
||||
|
||||
actionCommand = createRepositoryAction(actionManager, stashMenu,
|
||||
tr("Stash Pop"), QLatin1String("Git.StashPop"),
|
||||
tr("Stash Pop"), Core::Id("Git.StashPop"),
|
||||
globalcontext, true, &GitClient::stashPop);
|
||||
actionCommand.first->setToolTip(tr("Restores changes saved to the stash list using \"Stash\"."));
|
||||
|
||||
@@ -501,11 +500,11 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
gitContainer->addMenu(subversionMenu);
|
||||
|
||||
createRepositoryAction(actionManager, subversionMenu,
|
||||
tr("Log"), QLatin1String("Git.Subversion.Log"),
|
||||
tr("Log"), Core::Id("Git.Subversion.Log"),
|
||||
globalcontext, false, &GitClient::subversionLog);
|
||||
|
||||
createRepositoryAction(actionManager, subversionMenu,
|
||||
tr("Fetch"), QLatin1String("Git.Subversion.Fetch"),
|
||||
tr("Fetch"), Core::Id("Git.Subversion.Fetch"),
|
||||
globalcontext, false, &GitClient::synchronousSubversionFetch);
|
||||
|
||||
gitContainer->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.PushPull"), this));
|
||||
@@ -513,24 +512,24 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
gitContainer->addAction(createSeparator(actionManager, globalcontext, Core::Id("Git.Sep.Global"), this));
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Fetch"), QLatin1String("Git.Fetch"),
|
||||
tr("Fetch"), Core::Id("Git.Fetch"),
|
||||
globalcontext, true, SLOT(fetch()));
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Pull"), QLatin1String("Git.Pull"),
|
||||
tr("Pull"), Core::Id("Git.Pull"),
|
||||
globalcontext, true, SLOT(pull()));
|
||||
|
||||
actionCommand = createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Push"), QLatin1String("Git.Push"),
|
||||
tr("Push"), Core::Id("Git.Push"),
|
||||
globalcontext, true, SLOT(push()));
|
||||
|
||||
actionCommand = createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Commit..."), QLatin1String("Git.Commit"),
|
||||
tr("Commit..."), Core::Id("Git.Commit"),
|
||||
globalcontext, true, SLOT(startCommit()));
|
||||
actionCommand.second->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+C")));
|
||||
|
||||
createRepositoryAction(actionManager, gitContainer,
|
||||
tr("Amend Last Commit..."), QLatin1String("Git.AmendCommit"),
|
||||
tr("Amend Last Commit..."), Core::Id("Git.AmendCommit"),
|
||||
globalcontext, true, SLOT(startAmendCommit()));
|
||||
|
||||
// Subversion in a submenu.
|
||||
@@ -542,7 +541,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
for (int i = 0; i < count; i++) {
|
||||
Core::Command *tCommand
|
||||
= actionManager->registerAction(snapShotActions.at(i),
|
||||
QString(QLatin1String("Git.Snapshot.") + QString::number(i)),
|
||||
Core::Id(QLatin1String("Git.Snapshot.") + QString::number(i)),
|
||||
globalcontext);
|
||||
gitContainer->addAction(tCommand);
|
||||
}
|
||||
|
Reference in New Issue
Block a user