Git: Add subject to log combobox

Change-Id: Icb76ad1c0783615172d929e8cf402feaffaddbdd
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-01-29 23:26:36 +02:00
committed by Orgad Shaneh
parent f6f822f5f6
commit 8f4817152c
5 changed files with 35 additions and 3 deletions

View File

@@ -271,5 +271,17 @@ void GitEditor::addChangeActions(QMenu *menu, const QString &change)
menu->addAction(tr("Revert Change %1").arg(change), this, SLOT(revertChange()));
}
QString GitEditor::revisionSubject(const QTextBlock &inBlock) const
{
for (QTextBlock block = inBlock.next(); block.isValid(); block = block.next()) {
const QString line = block.text().trimmed();
if (line.isEmpty()) {
block = block.next();
return block.text().trimmed();
}
}
return QString();
}
} // namespace Internal
} // namespace Git