| 327 | } |
| 328 | |
| 329 | void CodeEditor::setError(const QString &code, int errorLine, const QStringList &symbols) |
| 330 | { |
| 331 | mHighlighter->setSymbols(symbols); |
| 332 | |
| 333 | setPlainText(code); |
| 334 | |
| 335 | mErrorPosition = getPos(code, errorLine); |
| 336 | QTextCursor tc = textCursor(); |
| 337 | tc.setPosition(mErrorPosition); |
| 338 | setTextCursor(tc); |
| 339 | centerCursor(); |
| 340 | |
| 341 | highlightErrorLine(); |
| 342 | } |
| 343 | |
| 344 | void CodeEditor::setError(int errorLine, const QStringList &symbols) |
| 345 | { |
no test coverage detected