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
@@ -647,7 +647,7 @@ bool BazaarPlugin::submitEditorAboutToClose()
|
||||
Core::IDocument *editorDocument = commitEditor->document();
|
||||
QTC_ASSERT(editorDocument, return true);
|
||||
|
||||
bool dummyPrompt = m_bazaarSettings.boolValue(BazaarSettings::promptOnSubmitKey);
|
||||
bool dummyPrompt = false;
|
||||
const VcsBase::VcsBaseSubmitEditor::PromptSubmitResult response =
|
||||
commitEditor->promptSubmit(tr("Close Commit Editor"), tr("Do you want to commit the changes?"),
|
||||
tr("Message check failed. Do you want to proceed?"),
|
||||
|
||||
@@ -54,7 +54,6 @@ BazaarSettings OptionsPageWidget::settings() const
|
||||
s.setValue(BazaarSettings::userEmailKey, m_ui.defaultEmailLineEdit->text().trimmed());
|
||||
s.setValue(BazaarSettings::logCountKey, m_ui.logEntriesCount->value());
|
||||
s.setValue(BazaarSettings::timeoutKey, m_ui.timeout->value());
|
||||
s.setValue(BazaarSettings::promptOnSubmitKey, m_ui.promptOnSubmitCheckBox->isChecked());
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -65,7 +64,6 @@ void OptionsPageWidget::setSettings(const BazaarSettings &s)
|
||||
m_ui.defaultEmailLineEdit->setText(s.stringValue(BazaarSettings::userEmailKey));
|
||||
m_ui.logEntriesCount->setValue(s.intValue(BazaarSettings::logCountKey));
|
||||
m_ui.timeout->setValue(s.intValue(BazaarSettings::timeoutKey));
|
||||
m_ui.promptOnSubmitCheckBox->setChecked(s.boolValue(BazaarSettings::promptOnSubmitKey));
|
||||
}
|
||||
|
||||
QString OptionsPageWidget::searchKeywords() const
|
||||
@@ -81,7 +79,6 @@ QString OptionsPageWidget::searchKeywords() const
|
||||
<< sep << m_ui.miscGroupBox->title()
|
||||
<< sep << m_ui.showLogEntriesLabel->text()
|
||||
<< sep << m_ui.timeoutSecondsLabel->text()
|
||||
<< sep << m_ui.promptOnSubmitCheckBox->text()
|
||||
;
|
||||
rc.remove(QLatin1Char('&'));
|
||||
return rc;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>649</width>
|
||||
<height>337</height>
|
||||
<height>268</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -132,16 +132,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="promptOnSubmitCheckBox">
|
||||
<property name="text">
|
||||
<string>Prompt on submit</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -606,7 +606,7 @@ bool MercurialPlugin::submitEditorAboutToClose()
|
||||
Core::IDocument *editorFile = commitEditor->document();
|
||||
QTC_ASSERT(editorFile, return true);
|
||||
|
||||
bool dummyPrompt = mercurialSettings.boolValue(MercurialSettings::promptOnSubmitKey);
|
||||
bool dummyPrompt = false;
|
||||
const VcsBaseSubmitEditor::PromptSubmitResult response =
|
||||
commitEditor->promptSubmit(tr("Close Commit Editor"), tr("Do you want to commit the changes?"),
|
||||
tr("Message check failed. Do you want to proceed?"),
|
||||
|
||||
@@ -56,7 +56,6 @@ MercurialSettings OptionsPageWidget::settings() const
|
||||
s.setValue(MercurialSettings::userEmailKey, m_ui.defaultEmailLineEdit->text().trimmed());
|
||||
s.setValue(MercurialSettings::logCountKey, m_ui.logEntriesCount->value());
|
||||
s.setValue(MercurialSettings::timeoutKey, m_ui.timeout->value());
|
||||
s.setValue(MercurialSettings::promptOnSubmitKey, m_ui.promptOnSubmitCheckBox->isChecked());
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -67,7 +66,6 @@ void OptionsPageWidget::setSettings(const MercurialSettings &s)
|
||||
m_ui.defaultEmailLineEdit->setText(s.stringValue(MercurialSettings::userEmailKey));
|
||||
m_ui.logEntriesCount->setValue(s.intValue(MercurialSettings::logCountKey));
|
||||
m_ui.timeout->setValue(s.intValue(MercurialSettings::timeoutKey));
|
||||
m_ui.promptOnSubmitCheckBox->setChecked(s.boolValue(MercurialSettings::promptOnSubmitKey));
|
||||
}
|
||||
|
||||
QString OptionsPageWidget::searchKeywords() const
|
||||
@@ -83,7 +81,6 @@ QString OptionsPageWidget::searchKeywords() const
|
||||
<< sep << m_ui.miscGroupBox->title()
|
||||
<< sep << m_ui.showLogEntriesLabel->text()
|
||||
<< sep << m_ui.timeoutSecondsLabel->text()
|
||||
<< sep << m_ui.promptOnSubmitCheckBox->text()
|
||||
;
|
||||
rc.remove(QLatin1Char('&'));
|
||||
return rc;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>617</width>
|
||||
<height>327</height>
|
||||
<height>268</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -82,26 +82,6 @@
|
||||
<string>Miscellaneous</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="showLogEntriesLabel">
|
||||
<property name="text">
|
||||
<string>Log count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="logEntriesCount">
|
||||
<property name="toolTip">
|
||||
<string>The number of recent commit logs to show, choose 0 to see all entries.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="timeoutSecondsLabel">
|
||||
<property name="text">
|
||||
@@ -132,13 +112,23 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="promptOnSubmitCheckBox">
|
||||
<property name="text">
|
||||
<string>Prompt on submit</string>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="logEntriesCount">
|
||||
<property name="toolTip">
|
||||
<string>The number of recent commit logs to show, choose 0 to see all entries.</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="showLogEntriesLabel">
|
||||
<property name="text">
|
||||
<string>Log count:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user