- QList<QTextLayout::FormatRange> formatRanges = QtUi::style()
- ->toTextLayoutList(formatList(),
- layout->text().length(),
- data(ChatLineModel::MsgLabelRole).value<UiStyle::MessageLabel>());
- layout->setAdditionalFormats(formatRanges);
+ UiStyle::FormatContainer formatRanges = QtUi::style()->toTextLayoutList(
+ formatList(),
+ layout->text().length(),
+ data(ChatLineModel::MsgLabelRole).value<UiStyle::MessageLabel>()
+ );
+ UiStyle::setTextLayoutFormats(*layout, formatRanges);