| 987 | } |
| 988 | |
| 989 | void next() |
| 990 | { |
| 991 | if(m_formatRanges.isEmpty() || m_formatRanges.back().format.foreground().color() != m_pen.color() || m_formatRanges.back().format.background().color() != m_background) |
| 992 | { |
| 993 | QTextLayout::FormatRange fr; |
| 994 | fr.length = 1; |
| 995 | fr.start = m_currentPos; |
| 996 | fr.format.setForeground(m_pen.color()); |
| 997 | fr.format.setBackground(m_background); |
| 998 | m_formatRanges.append(fr); |
| 999 | } |
| 1000 | else |
| 1001 | { |
| 1002 | ++m_formatRanges.back().length; |
| 1003 | } |
| 1004 | ++m_currentPos; |
| 1005 | } |
| 1006 | }; |
| 1007 | |
| 1008 | void DiffTextWindowData::prepareTextLayout(QTextLayout& textLayout, qint32 visibleTextWidth) |
no test coverage detected