forked from qt-creator/qt-creator
DVCS: Never prompt before committing
Commit is local. There's no reason to prompt. Change-Id: I3aed5ad4931bc49c62d52f906100273739f4af89 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
dba595fdea
commit
b034b0b955
@@ -1075,15 +1075,15 @@ bool GitPlugin::submitEditorAboutToClose()
|
||||
return true;
|
||||
// Prompt user. Force a prompt unless submit was actually invoked (that
|
||||
// is, the editor was closed or shutdown).
|
||||
bool *promptData = m_settings.boolPointer(GitSettings::promptOnSubmitKey);
|
||||
VcsBase::VcsBaseSubmitEditor::PromptSubmitResult answer;
|
||||
if (editor->forceClose()) {
|
||||
answer = VcsBase::VcsBaseSubmitEditor::SubmitDiscarded;
|
||||
} else {
|
||||
bool promptData = false;
|
||||
answer = editor->promptSubmit(tr("Closing Git Editor"),
|
||||
tr("Do you want to commit the change?"),
|
||||
tr("Git will not accept this commit. Do you want to continue to edit it?"),
|
||||
promptData, !m_submitActionTriggered, false);
|
||||
&promptData, !m_submitActionTriggered, false);
|
||||
}
|
||||
m_submitActionTriggered = false;
|
||||
switch (answer) {
|
||||
|
||||
@@ -72,7 +72,6 @@ GitSettings SettingsPageWidget::settings() const
|
||||
rc.setValue(GitSettings::timeoutKey, m_ui.timeoutSpinBox->value());
|
||||
rc.setValue(GitSettings::pullRebaseKey, m_ui.pullRebaseCheckBox->isChecked());
|
||||
rc.setValue(GitSettings::showTagsKey, m_ui.showTagsCheckBox->isChecked());
|
||||
rc.setValue(GitSettings::promptOnSubmitKey, m_ui.promptToSubmitCheckBox->isChecked());
|
||||
rc.setValue(GitSettings::winSetHomeEnvironmentKey, m_ui.winHomeCheckBox->isChecked());
|
||||
rc.setValue(GitSettings::gitkOptionsKey, m_ui.gitkOptionsLineEdit->text().trimmed());
|
||||
rc.setValue(GitSettings::repositoryBrowserCmd, m_ui.repBrowserCommandPathChooser->path().trimmed());
|
||||
@@ -86,7 +85,6 @@ void SettingsPageWidget::setSettings(const GitSettings &s)
|
||||
m_ui.timeoutSpinBox->setValue(s.intValue(GitSettings::timeoutKey));
|
||||
m_ui.pullRebaseCheckBox->setChecked(s.boolValue(GitSettings::pullRebaseKey));
|
||||
m_ui.showTagsCheckBox->setChecked(s.boolValue(GitSettings::showTagsKey));
|
||||
m_ui.promptToSubmitCheckBox->setChecked(s.boolValue(GitSettings::promptOnSubmitKey));
|
||||
m_ui.winHomeCheckBox->setChecked(s.boolValue(GitSettings::winSetHomeEnvironmentKey));
|
||||
m_ui.gitkOptionsLineEdit->setText(s.stringValue(GitSettings::gitkOptionsKey));
|
||||
m_ui.repBrowserCommandPathChooser->setPath(s.stringValue(GitSettings::repositoryBrowserCmd));
|
||||
@@ -102,8 +100,6 @@ QString SettingsPageWidget::searchKeywords() const
|
||||
<< sep << m_ui.groupBox->title()
|
||||
<< sep << m_ui.logCountLabel->text()
|
||||
<< sep << m_ui.timeoutLabel->text()
|
||||
<< sep << m_ui.promptToSubmitCheckBox->text()
|
||||
<< sep << m_ui.promptToSubmitCheckBox->text()
|
||||
<< sep << m_ui.gitkGroupBox->title()
|
||||
<< sep << m_ui.gitkOptionsLabel->text()
|
||||
<< sep << m_ui.repBrowserGroupBox->title()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>705</width>
|
||||
<height>459</height>
|
||||
<height>427</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@@ -60,7 +60,7 @@
|
||||
<string>Miscellaneous</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="pullRebaseCheckBox">
|
||||
<property name="text">
|
||||
<string>Pull with rebase</string>
|
||||
@@ -96,13 +96,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="promptToSubmitCheckBox">
|
||||
<property name="text">
|
||||
<string>Prompt on submit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="logCountLabel">
|
||||
<property name="text">
|
||||
@@ -130,7 +123,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="showTagsCheckBox">
|
||||
<property name="text">
|
||||
<string>Show tags in Branches dialog</string>
|
||||
|
||||
Reference in New Issue
Block a user