Git: Enable buttons by default on commit actions

Do not wait until the commit description appears. If the commit is
invalid, disable the buttons.

Change-Id: If9d28ae742433f453f4147af46dec81cbef902c4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2016-06-08 14:43:41 +03:00
committed by Orgad Shaneh
parent 5ca8a921f6
commit e043741fe8

View File

@@ -181,11 +181,11 @@ void ChangeSelectionDialog::setDetails(int exitCode)
m_ui->detailsText->setPlainText(QString::fromUtf8(m_process->readAllStandardOutput()));
palette.setColor(QPalette::Text, theme->color(Theme::TextColorNormal));
m_ui->changeNumberEdit->setPalette(palette);
enableButtons(true);
} else {
m_ui->detailsText->setPlainText(tr("Error: Unknown reference"));
palette.setColor(QPalette::Text, theme->color(Theme::TextColorError));
m_ui->changeNumberEdit->setPalette(palette);
enableButtons(false);
}
}
@@ -231,7 +231,7 @@ void ChangeSelectionDialog::recalculateCompletion()
void ChangeSelectionDialog::recalculateDetails()
{
terminateProcess();
enableButtons(false);
enableButtons(true);
const QString workingDir = workingDirectory();
if (workingDir.isEmpty()) {