| 8 | #include "common/util/qtcassert.h" |
| 9 | |
| 10 | static QColor textColor(uint code) |
| 11 | { |
| 12 | QTC_ASSERT(code < 8, return QColor()); |
| 13 | |
| 14 | const int red = code & 1 ? 170 : 0; |
| 15 | const int green = code & 2 ? 170 : 0; |
| 16 | const int blue = code & 4 ? 170 : 0; |
| 17 | return QColor(red, green, blue); |
| 18 | } |
| 19 | |
| 20 | QList<FormattedText> CodeFormatHandler::parseText(const FormattedText &input) |
| 21 | { |