| 872 | } |
| 873 | |
| 874 | void TextEditor::onCursorPositionChanged(int line, int index) |
| 875 | { |
| 876 | Q_UNUSED(line) |
| 877 | |
| 878 | d->delayCursorTimer.start(); |
| 879 | editor.cursorPositionChanged(d->fileName, line, index); |
| 880 | int pos = positionFromLineIndex(line, index); |
| 881 | |
| 882 | if (!d->contentsChanged && d->lastCursorNeedRecord) { |
| 883 | emit cursorRecordChanged(d->lastCursorPos); |
| 884 | d->lastCursorNeedRecord = false; |
| 885 | } else if (d->contentsChanged || d->postionChangedByGoto) { |
| 886 | d->lastCursorNeedRecord = true; |
| 887 | d->postionChangedByGoto = false; |
| 888 | } |
| 889 | d->lastCursorPos = pos; |
| 890 | } |
| 891 | |
| 892 | void TextEditor::focusOutEvent(QFocusEvent *event) |
| 893 | { |
nothing calls this directly
no test coverage detected