forked from qt-creator/qt-creator
Adapt to 4.9
Change-Id: I9c413eaf6d70eaf09640aed349c876c040ef55ba Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -141,12 +141,15 @@ bool FossilCommitWidget::isPrivateOptionEnabled() const
|
||||
return m_commitPanelUi.isPrivateCheckBox->isChecked();
|
||||
}
|
||||
|
||||
bool FossilCommitWidget::canSubmit() const
|
||||
bool FossilCommitWidget::canSubmit(QString *whyNot) const
|
||||
{
|
||||
QString message = cleanupDescription(descriptionText()).trimmed();
|
||||
|
||||
if (m_commitPanelUi.invalidBranchLabel->isVisible() || message.isEmpty())
|
||||
if (m_commitPanelUi.invalidBranchLabel->isVisible() || message.isEmpty()) {
|
||||
if (whyNot)
|
||||
*whyNot = tr("Message check failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return VcsBase::SubmitEditorWidget::canSubmit();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
bool isPrivateOptionEnabled() const;
|
||||
|
||||
protected:
|
||||
bool canSubmit() const;
|
||||
bool canSubmit(QString *whyNot = nullptr) const;
|
||||
|
||||
private slots:
|
||||
void branchChanged();
|
||||
|
||||
@@ -663,10 +663,8 @@ bool FossilPlugin::submitEditorAboutToClose()
|
||||
QTC_ASSERT(editorDocument, return true);
|
||||
|
||||
bool promptOnSubmit = 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?"),
|
||||
&promptOnSubmit, !m_submitActionTriggered);
|
||||
const VcsBase::VcsBaseSubmitEditor::PromptSubmitResult response
|
||||
= commitEditor->promptSubmit(this, &promptOnSubmit, !m_submitActionTriggered);
|
||||
m_submitActionTriggered = false;
|
||||
|
||||
switch (response) {
|
||||
|
||||
Reference in New Issue
Block a user