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

@@ -857,7 +857,16 @@ void VcsBaseEditorWidget::slotPopulateLogBrowser()
// Check for a new log section (not repeating the last filename)
if (d->m_logEntryPattern.indexIn(text) != -1) {
d->m_entrySections.push_back(d->m_entrySections.empty() ? 0 : lineNumber);
entriesComboBox->addItem(d->m_logEntryPattern.cap(1));
QString entry = d->m_logEntryPattern.cap(1);
QString subject = revisionSubject(it);
if (!subject.isEmpty()) {
if (subject.length() > 100) {
subject.truncate(97);
subject.append(QLatin1String("..."));
}
entry.append(QLatin1String(" - ")).append(subject);
}
entriesComboBox->addItem(entry);
}
}
}
@@ -1480,6 +1489,12 @@ bool VcsBaseEditorWidget::isValidRevision(const QString &revision) const
return true;
}
QString VcsBaseEditorWidget::revisionSubject(const QTextBlock &inBlock) const
{
Q_UNUSED(inBlock);
return QString();
}
bool VcsBaseEditorWidget::hasDiff() const
{
switch (d->m_parameters->type) {