aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git/gitsubmiteditorwidget.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2021-09-27 14:57:38 +0300
committerOrgad Shaneh <orgads@gmail.com>2021-09-27 12:32:41 +0000
commit656432508170f9bf0c9cc343a88bce4d858f7d08 (patch)
tree8a936ae39c73f0480161de4be9b122c151b8835b /src/plugins/git/gitsubmiteditorwidget.cpp
parentd341ab6371fb97394865cf9c795f0f486174eb51 (diff)
Git: Add "Show HEAD" link in amend commit editor
Fixes: QTCREATORBUG-25004 Change-Id: Idac181c8821da41a21d86cb1760691d51158daee Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/plugins/git/gitsubmiteditorwidget.cpp')
-rw-r--r--src/plugins/git/gitsubmiteditorwidget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp
index 02328d2898..eaf3428c84 100644
--- a/src/plugins/git/gitsubmiteditorwidget.cpp
+++ b/src/plugins/git/gitsubmiteditorwidget.cpp
@@ -65,6 +65,8 @@ GitSubmitEditorWidget::GitSubmitEditorWidget() :
this, &GitSubmitEditorWidget::authorInformationChanged);
connect(m_gitSubmitPanelUi.emailLineEdit, &QLineEdit::textChanged,
this, &GitSubmitEditorWidget::authorInformationChanged);
+ connect(m_gitSubmitPanelUi.showHeadLabel, &QLabel::linkActivated,
+ this, [this] { emit showRequested("HEAD"); });
}
void GitSubmitEditorWidget::setPanelInfo(const GitSubmitEditorPanelInfo &info)
@@ -99,6 +101,8 @@ void GitSubmitEditorWidget::initialize(CommitType commitType,
if (m_isInitialized)
return;
m_isInitialized = true;
+ if (commitType != AmendCommit)
+ m_gitSubmitPanelUi.showHeadLabel->hide();
if (commitType == FixupCommit) {
auto logChangeGroupBox = new QGroupBox(tr("Select Change"));
auto logChangeLayout = new QVBoxLayout;