summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-03-10 12:21:33 +0200
committerOrgad Shaneh <orgads@gmail.com>2015-03-10 12:55:29 +0000
commit94cf79f8959928606f38378217ac1b43d077350e (patch)
treec32dc204ca3a3520dc1e29999fead274e7d51b44
parentcf8d601b1d5fa1330da73ca004cc8cb3e3ff1270 (diff)
downloadqt-creator-94cf79f8959928606f38378217ac1b43d077350e.tar.gz
VCS: Add accelerators to context menu entry in editors
Change-Id: I57b89670999d1f4857dcbdf94d8dc1f480e337c1 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
-rw-r--r--src/plugins/bazaar/bazaareditor.cpp4
-rw-r--r--src/plugins/git/giteditor.cpp12
-rw-r--r--src/plugins/mercurial/mercurialeditor.cpp4
-rw-r--r--src/plugins/vcsbase/vcsbaseeditor.cpp2
4 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/bazaar/bazaareditor.cpp b/src/plugins/bazaar/bazaareditor.cpp
index 0c8ec34b6a..32bb0c5023 100644
--- a/src/plugins/bazaar/bazaareditor.cpp
+++ b/src/plugins/bazaar/bazaareditor.cpp
@@ -46,8 +46,8 @@ BazaarEditorWidget::BazaarEditorWidget() :
m_changesetId(QLatin1String(Constants::CHANGESET_ID)),
m_exactChangesetId(QLatin1String(Constants::CHANGESET_ID_EXACT))
{
- setAnnotateRevisionTextFormat(tr("Annotate %1"));
- setAnnotatePreviousRevisionTextFormat(tr("Annotate parent revision %1"));
+ setAnnotateRevisionTextFormat(tr("&Annotate %1"));
+ setAnnotatePreviousRevisionTextFormat(tr("Annotate &parent revision %1"));
// Diff format:
// === <change> <file|dir> 'mainwindow.cpp'
setDiffFilePattern(QRegExp(QLatin1String("^=== [a-z]+ [a-z]+ '(.+)'\\s*")));
diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp
index 024ecb4d94..3e7268a9b0 100644
--- a/src/plugins/git/giteditor.cpp
+++ b/src/plugins/git/giteditor.cpp
@@ -75,8 +75,8 @@ GitEditorWidget::GitEditorWidget() :
*/
setDiffFilePattern(QRegExp(QLatin1String("^(?:diff --git a/|index |[+-]{3} (?:/dev/null|[ab]/(.+$)))")));
setLogEntryPattern(QRegExp(QLatin1String("^commit ([0-9a-f]{8})[0-9a-f]{32}")));
- setAnnotateRevisionTextFormat(tr("Blame %1"));
- setAnnotatePreviousRevisionTextFormat(tr("Blame Parent Revision %1"));
+ setAnnotateRevisionTextFormat(tr("&Blame %1"));
+ setAnnotatePreviousRevisionTextFormat(tr("Blame &Parent Revision %1"));
}
QSet<QString> GitEditorWidget::annotationChanges() const
@@ -345,10 +345,10 @@ void GitEditorWidget::addChangeActions(QMenu *menu, const QString &change)
{
m_currentChange = change;
if (contentType() != OtherContent) {
- menu->addAction(tr("Cherry-Pick Change %1").arg(change), this, SLOT(cherryPickChange()));
- menu->addAction(tr("Revert Change %1").arg(change), this, SLOT(revertChange()));
- menu->addAction(tr("Checkout Change %1").arg(change), this, SLOT(checkoutChange()));
- menu->addAction(tr("Hard Reset to Change %1").arg(change), this, SLOT(resetChange()));
+ menu->addAction(tr("Cherr&y-Pick Change %1").arg(change), this, SLOT(cherryPickChange()));
+ menu->addAction(tr("Re&vert Change %1").arg(change), this, SLOT(revertChange()));
+ menu->addAction(tr("C&heckout Change %1").arg(change), this, SLOT(checkoutChange()));
+ menu->addAction(tr("Hard &Reset to Change %1").arg(change), this, SLOT(resetChange()));
}
}
diff --git a/src/plugins/mercurial/mercurialeditor.cpp b/src/plugins/mercurial/mercurialeditor.cpp
index 75cb3a8b32..6d8a2bc936 100644
--- a/src/plugins/mercurial/mercurialeditor.cpp
+++ b/src/plugins/mercurial/mercurialeditor.cpp
@@ -55,8 +55,8 @@ MercurialEditorWidget::MercurialEditorWidget() :
{
setDiffFilePattern(QRegExp(QLatin1String(Constants::DIFFIDENTIFIER)));
setLogEntryPattern(QRegExp(QLatin1String("^changeset:\\s+(\\S+)$")));
- setAnnotateRevisionTextFormat(tr("Annotate %1"));
- setAnnotatePreviousRevisionTextFormat(tr("Annotate parent revision %1"));
+ setAnnotateRevisionTextFormat(tr("&Annotate %1"));
+ setAnnotatePreviousRevisionTextFormat(tr("Annotate &parent revision %1"));
}
QSet<QString> MercurialEditorWidget::annotationChanges() const
diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp
index f7e912840b..7499d8b836 100644
--- a/src/plugins/vcsbase/vcsbaseeditor.cpp
+++ b/src/plugins/vcsbase/vcsbaseeditor.cpp
@@ -345,7 +345,7 @@ void ChangeTextCursorHandler::slotCopyRevision()
QAction *ChangeTextCursorHandler::createDescribeAction(const QString &change) const
{
- auto a = new QAction(VcsBaseEditorWidget::tr("Describe Change %1").arg(change), 0);
+ auto a = new QAction(VcsBaseEditorWidget::tr("&Describe Change %1").arg(change), 0);
connect(a, &QAction::triggered, this, &ChangeTextCursorHandler::slotDescribe);
return a;
}