MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / performNewSearch

Method performNewSearch

src/widgets/QuickFindWidget.cpp:114–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void QuickFindWidget::performNewSearch()
115{
116 clearHighlights();
117 clearCachedMatches();
118 ui->lblInfo->hide();
119
120 // Early out
121 if (searchText().isEmpty()) {
122 setSearchContextColorGood();
123 return;
124 }
125
126 prepareSearch();
127 finder->forEachMatch([&](int start, int end) {
128 matches.append(qMakePair(start, end));
129 return qMax(start + 1, end);
130 });
131
132 if (matches.empty()) {
133 setSearchContextColorBad();
134 }
135 else {
136 setSearchContextColorGood();
137 }
138
139 highlightMatches();
140 navigateToNextMatch(false);
141}
142
143void QuickFindWidget::highlightMatches()
144{

Callers

nothing calls this directly

Calls 2

isEmptyMethod · 0.80
forEachMatchMethod · 0.45

Tested by

no test coverage detected