Make VCS plugins keep the submit editor open if the submit fails.

This commit is contained in:
Friedemann Kleint
2009-03-20 16:52:22 +01:00
parent 2fc4e90015
commit 2dfd7349a3
5 changed files with 35 additions and 30 deletions

View File

@@ -153,8 +153,9 @@ void PerforceSubmitEditor::updateEntries()
const QString tab = QString(QLatin1Char('\t'));
QStringList lines = submitEditorWidget()->descriptionText().split(newLine);
while (lines.last().isEmpty())
lines.removeLast();
while (!lines.empty() && lines.last().isEmpty())
lines.removeLast();
// Description
lines.replaceInStrings(QRegExp(QLatin1String("^")), tab);
m_entries.insert(QLatin1String("Description"), newLine + lines.join(newLine) + QLatin1String("\n\n"));