forked from qt-creator/qt-creator
Git/Hg SubmitEditor: Fix buttons in confirmation dialog for close
Don't show the "cancel" button. Task-number: QTCREATORBUG-10451 Change-Id: I904794460ef15562eb8db630d33b8a2443b036eb Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -579,8 +579,13 @@ VcsBaseSubmitEditor::PromptSubmitResult
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Check failed.
|
// Check failed.
|
||||||
|
QMessageBox::StandardButtons buttons;
|
||||||
|
if (canCommitOnFailure)
|
||||||
|
buttons = QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel;
|
||||||
|
else
|
||||||
|
buttons = QMessageBox::Yes|QMessageBox::No;
|
||||||
QMessageBox msgBox(QMessageBox::Question, title, checkFailureQuestion,
|
QMessageBox msgBox(QMessageBox::Question, title, checkFailureQuestion,
|
||||||
QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel, parent);
|
buttons, parent);
|
||||||
msgBox.setDefaultButton(QMessageBox::Cancel);
|
msgBox.setDefaultButton(QMessageBox::Cancel);
|
||||||
msgBox.setInformativeText(errorMessage);
|
msgBox.setInformativeText(errorMessage);
|
||||||
msgBox.setMinimumWidth(checkDialogMinimumWidth);
|
msgBox.setMinimumWidth(checkDialogMinimumWidth);
|
||||||
|
|||||||
Reference in New Issue
Block a user