| 98 | } |
| 99 | |
| 100 | void QCodeEditor::setHighlighter(QStyleSyntaxHighlighter *highlighter) |
| 101 | { |
| 102 | if (m_highlighter) |
| 103 | { |
| 104 | m_highlighter->setDocument(nullptr); |
| 105 | } |
| 106 | |
| 107 | m_highlighter = highlighter; |
| 108 | |
| 109 | if (m_highlighter) |
| 110 | { |
| 111 | m_highlighter->setSyntaxStyle(m_syntaxStyle); |
| 112 | m_highlighter->setDocument(document()); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | QStyleSyntaxHighlighter *QCodeEditor::highlighter() const |
| 117 | { |
no test coverage detected