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

Method navigateToPrevMatch

src/widgets/QuickFindWidget.cpp:203–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void QuickFindWidget::navigateToPrevMatch()
204{
205 qInfo(Q_FUNC_INFO);
206
207 // Early out if there are no matches
208 if (matches.length() == 0) {
209 ui->lblInfo->hide();
210 return;
211 }
212
213 if (currentMatchIndex != -1) {
214 currentMatchIndex--;
215 if (currentMatchIndex < 0) {
216 currentMatchIndex = matches.length() - 1;
217 }
218 }
219 else {
220 qWarning("navigateToPrevMatch() with no valid index yet");
221 return;
222 }
223
224 // Search wrapped around
225 if (currentMatchIndex == matches.length() - 1) {
226 showWrapIndicator();
227 }
228
229 goToCurrentMatch();
230}
231
232void QuickFindWidget::goToCurrentMatch()
233{

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected