MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / findReplaceInNotePressed

Method findReplaceInNotePressed

gui/nbrowserwindow.cpp:3880–3893  ·  view source on GitHub ↗

Find/replace button pressed, so we need to highlight all the occurrences in a note.

Source from the content-addressed store, hash-verified

3878//* in a note.
3879//***************************************
3880void NBrowserWindow::findReplaceInNotePressed() {
3881 QString find = findReplace->findLine->text();
3882 QString replace = findReplace->replaceLine->text();
3883 if (find == "")
3884 return;
3885 bool found = false;
3886 found = editor->page()->findText(find,
3887 findReplace->getCaseSensitive() | QWebPage::FindWrapsAroundDocument);
3888 if (!found)
3889 return;
3890
3891 QApplication::clipboard()->setText(replace);
3892 editor->pasteAction->trigger();
3893}
3894
3895
3896

Callers

nothing calls this directly

Calls 2

getCaseSensitiveMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected