| 200 | } |
| 201 | |
| 202 | QString EditorDocumentFind::findString() const |
| 203 | { |
| 204 | auto w = d->autoAdjustCurrentEditor(); |
| 205 | auto editor = qobject_cast<TextEditor *>(w); |
| 206 | if (!editor) |
| 207 | return {}; |
| 208 | |
| 209 | QString findText = editor->selectedText(); |
| 210 | if (findText.isEmpty()) |
| 211 | findText = editor->wordAtPosition(editor->cursorPosition()); |
| 212 | |
| 213 | return findText; |
| 214 | } |
| 215 | |
| 216 | void EditorDocumentFind::findNext(const QString &txt) |
| 217 | { |
no test coverage detected