forked from qt-creator/qt-creator
Git: Move hasRemotes out of panel data
It is input only, and doesn't belong to the panel Also rename it enablePush Change-Id: I9d5e2246ce76854a54b02e69980214dd35a402ee Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
589d9c7773
commit
c07eaa2a25
@@ -87,7 +87,8 @@ void GitSubmitEditorWidget::setHasUnmerged(bool e)
|
||||
void GitSubmitEditorWidget::initialize(CommitType commitType,
|
||||
const QString &repository,
|
||||
const GitSubmitEditorPanelData &data,
|
||||
const GitSubmitEditorPanelInfo &info)
|
||||
const GitSubmitEditorPanelInfo &info,
|
||||
bool enablePush)
|
||||
{
|
||||
if (m_isInitialized)
|
||||
return;
|
||||
@@ -108,7 +109,7 @@ void GitSubmitEditorWidget::initialize(CommitType commitType,
|
||||
setPanelData(data);
|
||||
setPanelInfo(info);
|
||||
|
||||
if (data.hasRemotes && commitType != FixupCommit) {
|
||||
if (enablePush && commitType != FixupCommit) {
|
||||
QMenu *menu = new QMenu(this);
|
||||
menu->addAction(tr("&Commit only"), this, SLOT(commitOnlySlot()));
|
||||
menu->addAction(tr("Commit and &Push"), this, SLOT(commitAndPushSlot()));
|
||||
|
||||
Reference in New Issue
Block a user