PushToGerrit: Do not calculate number of commits for empty input

Change-Id: Ib2e5305dd47b486a963edf5bb04e6d16d76d5e68
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2014-02-14 10:27:05 +02:00
committed by Orgad Shaneh
parent 5a562e9239
commit 48a5fb4b13

View File

@@ -201,9 +201,12 @@ void GerritPushDialog::setChangeRange()
setRemoteBranches(true);
return;
}
const QString remoteBranchName = selectedRemoteBranchName();
if (remoteBranchName.isEmpty())
return;
QString remote = selectedRemoteName();
remote += QLatin1Char('/');
remote += selectedRemoteBranchName();
remote += remoteBranchName;
const QString branch = m_ui->localBranchComboBox->currentText();
m_ui->infoLabel->setText(tr("Number of commits between %1 and %2: %3")
.arg(branch)