| 29 | #include <QtGlobal> |
| 30 | |
| 31 | CodeEditor::CodeEditor(QWidget* parent) : |
| 32 | QPlainTextEdit(parent), |
| 33 | showTooltips(true), |
| 34 | highlightLine(false) |
| 35 | { |
| 36 | preferencesUpdated(); |
| 37 | highlighter = new SyntaxHighlighter(document()); |
| 38 | lineNumberArea = new LineNumberArea(this); |
| 39 | |
| 40 | connect(this,&CodeEditor::blockCountChanged,this,&CodeEditor::updateLineNumberAreaWidth); |
| 41 | connect(this,&CodeEditor::updateRequest,this,&CodeEditor::updateLineNumberArea); |
| 42 | connect(this,&CodeEditor::cursorPositionChanged,this,&CodeEditor::highlightCurrentLine); |
| 43 | |
| 44 | updateLineNumberAreaWidth(0); |
| 45 | } |
| 46 | |
| 47 | CodeEditor::~CodeEditor() |
| 48 | { |
nothing calls this directly
no outgoing calls
no test coverage detected