TaskDelegate: Use additional formats in text layout for sizeHints

Task-number: QTCREATORBUG-11621

Change-Id: I2be90e1814afcaab8c3c9a84e2682e5192dfe472
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Daniel Teske
2014-03-03 12:31:33 +01:00
parent 1b582aa072
commit 8acf986649

View File

@@ -730,6 +730,7 @@ QSize TaskDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelInd
int height = 0; int height = 0;
description.replace(QLatin1Char('\n'), QChar::LineSeparator); description.replace(QLatin1Char('\n'), QChar::LineSeparator);
QTextLayout tl(description); QTextLayout tl(description);
tl.setAdditionalFormats(index.data(TaskModel::Task_t).value<ProjectExplorer::Task>().formats);
tl.beginLayout(); tl.beginLayout();
while (true) { while (true) {
QTextLine line = tl.createLine(); QTextLine line = tl.createLine();