forked from qt-creator/qt-creator
Git: Minor cleanup in GitSubmitEditorWidget
Accept CommitData struct instead of passing most of its members separately. Change-Id: I04b3b7ea0c02d12cae87e42d44af3808722b6371 Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
33001a866f
commit
4cf75c78ac
@@ -158,18 +158,14 @@ void GitSubmitEditorWidget::setHasUnmerged(bool e)
|
||||
m_hasUnmerged = e;
|
||||
}
|
||||
|
||||
void GitSubmitEditorWidget::initialize(CommitType commitType,
|
||||
const FilePath &repository,
|
||||
const GitSubmitEditorPanelData &data,
|
||||
const GitSubmitEditorPanelInfo &info,
|
||||
bool enablePush)
|
||||
void GitSubmitEditorWidget::initialize(const FilePath &repository, const CommitData &data)
|
||||
{
|
||||
if (m_isInitialized)
|
||||
return;
|
||||
m_isInitialized = true;
|
||||
if (commitType != AmendCommit)
|
||||
if (data.commitType != AmendCommit)
|
||||
m_gitSubmitPanel->showHeadLabel->hide();
|
||||
if (commitType == FixupCommit) {
|
||||
if (data.commitType == FixupCommit) {
|
||||
auto logChangeGroupBox = new QGroupBox(tr("Select Change"));
|
||||
auto logChangeLayout = new QVBoxLayout;
|
||||
logChangeGroupBox->setLayout(logChangeLayout);
|
||||
@@ -182,10 +178,10 @@ void GitSubmitEditorWidget::initialize(CommitType commitType,
|
||||
hideDescription();
|
||||
}
|
||||
insertTopWidget(m_gitSubmitPanel);
|
||||
setPanelData(data);
|
||||
setPanelInfo(info);
|
||||
setPanelData(data.panelData);
|
||||
setPanelInfo(data.panelInfo);
|
||||
|
||||
if (enablePush) {
|
||||
if (data.enablePush) {
|
||||
auto menu = new QMenu(this);
|
||||
connect(menu->addAction(tr("&Commit only")), &QAction::triggered,
|
||||
this, &GitSubmitEditorWidget::commitOnlySlot);
|
||||
|
||||
Reference in New Issue
Block a user