forked from qt-creator/qt-creator
Git: Add subject to log combobox
Change-Id: Icb76ad1c0783615172d929e8cf402feaffaddbdd Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
f6f822f5f6
commit
8f4817152c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user