Commit 2ad1efd8 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

DiffEditor: Do not leave a blank line when there are no branches

After expanding branches, notify the user in case there are none.

Change-Id: Id8a8d18933394208f8823c55124189ab37be4153
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 58aa9324
......@@ -147,8 +147,11 @@ QString DiffEditorController::prepareBranchesForCommit(const QString &output)
moreBranches = QLatin1Char(' ') + tr("and %n more", 0, branchCount - leave);
res.erase(res.begin() + leave, res.end());
}
if (!res.isEmpty())
branches = (QLatin1String("Branches: ") + res.join(QLatin1String(", ")) + moreBranches);
branches = QLatin1String("Branches: ");
if (res.isEmpty())
branches += tr("<None>");
else
branches += res.join(QLatin1String(", ")) + moreBranches;
return branches;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment