| 5 | #include <QDir> |
| 6 | |
| 7 | QTextCharFormat ConsoleStyleEntry::toFormat() const |
| 8 | { |
| 9 | QTextCharFormat fmt; |
| 10 | if (color.isValid()) |
| 11 | fmt.setForeground(color); |
| 12 | if (bold) |
| 13 | fmt.setFontWeight(QFont::Bold); |
| 14 | if (italic) |
| 15 | fmt.setFontItalic(true); |
| 16 | if (underline) |
| 17 | fmt.setFontUnderline(true); |
| 18 | return fmt; |
| 19 | } |
| 20 | |
| 21 | ConsoleStyleEntry ConsoleStyleEntry::fromJson(const QJsonObject& obj) |
| 22 | { |
no test coverage detected