forked from qt-creator/qt-creator
Git: Use a separate thread for updating commit data
Task-number: QTCREATORBUG-12449 Change-Id: I3057ca458272daac72c54abce1d6f9acf6a5d4af Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
aaa7cd5851
commit
f3106ebafe
@@ -156,6 +156,7 @@ struct SubmitEditorWidgetPrivate
|
||||
bool m_commitEnabled;
|
||||
bool m_ignoreChange;
|
||||
bool m_descriptionMandatory;
|
||||
bool m_updateInProgress;
|
||||
|
||||
QActionPushButton *m_submitButton;
|
||||
};
|
||||
@@ -170,6 +171,7 @@ SubmitEditorWidgetPrivate::SubmitEditorWidgetPrivate() :
|
||||
m_commitEnabled(false),
|
||||
m_ignoreChange(false),
|
||||
m_descriptionMandatory(true),
|
||||
m_updateInProgress(false),
|
||||
m_submitButton(0)
|
||||
{
|
||||
}
|
||||
@@ -567,12 +569,20 @@ void SubmitEditorWidget::descriptionTextChanged()
|
||||
|
||||
bool SubmitEditorWidget::canSubmit() const
|
||||
{
|
||||
if (d->m_updateInProgress)
|
||||
return false;
|
||||
if (isDescriptionMandatory() && cleanupDescription(descriptionText()).trimmed().isEmpty())
|
||||
return false;
|
||||
const unsigned checkedCount = checkedFilesCount();
|
||||
return d->m_emptyFileListEnabled || checkedCount > 0;
|
||||
}
|
||||
|
||||
void SubmitEditorWidget::setUpdateInProgress(bool value)
|
||||
{
|
||||
d->m_updateInProgress = value;
|
||||
updateSubmitAction();
|
||||
}
|
||||
|
||||
QString SubmitEditorWidget::commitName() const
|
||||
{
|
||||
return tr("&Commit");
|
||||
|
||||
Reference in New Issue
Block a user