forked from qt-creator/qt-creator
Core: make useMacShortcut constexpr
Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -337,21 +337,21 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
createFileAction(currentFileMenu, tr("Diff Current File"), tr("Diff of \"%1\""),
|
||||
"Git.Diff", context, true, std::bind(&GitPlugin::diffCurrentFile, this),
|
||||
QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+D") : tr("Alt+G,Alt+D")));
|
||||
QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+D") : tr("Alt+G,Alt+D")));
|
||||
|
||||
createFileAction(currentFileMenu, tr("Log Current File"), tr("Log of \"%1\""),
|
||||
"Git.Log", context, true, std::bind(&GitPlugin::logFile, this),
|
||||
QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+L") : tr("Alt+G,Alt+L")));
|
||||
QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+L") : tr("Alt+G,Alt+L")));
|
||||
|
||||
createFileAction(currentFileMenu, tr("Blame Current File"), tr("Blame for \"%1\""),
|
||||
"Git.Blame", context, true, std::bind(&GitPlugin::blameFile, this),
|
||||
QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+B") : tr("Alt+G,Alt+B")));
|
||||
QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+B") : tr("Alt+G,Alt+B")));
|
||||
|
||||
currentFileMenu->addSeparator(context);
|
||||
|
||||
createFileAction(currentFileMenu, tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"),
|
||||
"Git.Stage", context, true, std::bind(&GitPlugin::stageFile, this),
|
||||
QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+A") : tr("Alt+G,Alt+A")));
|
||||
QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+A") : tr("Alt+G,Alt+A")));
|
||||
|
||||
createFileAction(currentFileMenu, tr("Unstage File from Commit"), tr("Unstage \"%1\" from Commit"),
|
||||
"Git.Unstage", context, true, std::bind(&GitPlugin::unstageFile, this));
|
||||
@@ -363,7 +363,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
createFileAction(currentFileMenu, tr("Undo Uncommitted Changes"), tr("Undo Uncommitted Changes for \"%1\""),
|
||||
"Git.Undo", context,
|
||||
true, std::bind(&GitPlugin::undoFileChanges, this, true),
|
||||
QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+U") : tr("Alt+G,Alt+U")));
|
||||
QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+U") : tr("Alt+G,Alt+U")));
|
||||
|
||||
|
||||
/* "Current Project" menu */
|
||||
@@ -373,11 +373,11 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
createProjectAction(currentProjectMenu, tr("Diff Current Project"), tr("Diff Project \"%1\""),
|
||||
"Git.DiffProject", context, true, &GitPlugin::diffCurrentProject,
|
||||
QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+Shift+D") : tr("Alt+G,Alt+Shift+D")));
|
||||
QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+Shift+D") : tr("Alt+G,Alt+Shift+D")));
|
||||
|
||||
createProjectAction(currentProjectMenu, tr("Log Project"), tr("Log Project \"%1\""),
|
||||
"Git.LogProject", context, true, &GitPlugin::logProject,
|
||||
QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+K") : tr("Alt+G,Alt+K")));
|
||||
QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+K") : tr("Alt+G,Alt+K")));
|
||||
|
||||
createProjectAction(currentProjectMenu, tr("Clean Project..."), tr("Clean Project \"%1\"..."),
|
||||
"Git.CleanProject", context, true, &GitPlugin::cleanProject);
|
||||
@@ -408,7 +408,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
createRepositoryAction(localRepositoryMenu, tr("Commit..."), "Git.Commit",
|
||||
context, true, std::bind(&GitPlugin::startCommit, this, SimpleCommit),
|
||||
QKeySequence(UseMacShortcuts ? tr("Meta+G,Meta+C") : tr("Alt+G,Alt+C")));
|
||||
QKeySequence(useMacShortcuts ? tr("Meta+G,Meta+C") : tr("Alt+G,Alt+C")));
|
||||
|
||||
createRepositoryAction(localRepositoryMenu, tr("Amend Last Commit..."), "Git.AmendCommit",
|
||||
context, true, std::bind(&GitPlugin::startCommit, this, AmendCommit));
|
||||
|
Reference in New Issue
Block a user