MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / findString

Method findString

src/plugins/codeeditor/find/editordocumentfind.cpp:202–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202QString 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
216void EditorDocumentFind::findNext(const QString &txt)
217{

Callers 1

openFindToolBarMethod · 0.45

Calls 5

wordAtPositionMethod · 0.80
selectedTextMethod · 0.45
isEmptyMethod · 0.45
cursorPositionMethod · 0.45

Tested by

no test coverage detected