forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Orgad Shaneh
parent
d341ab6371
commit
6564325081
@@ -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;
|
||||
|
@@ -60,6 +60,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="showHeadLabel">
|
||||
<property name="text">
|
||||
<string><a href="head">Show HEAD</a></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
Reference in New Issue
Block a user