| 201 | } |
| 202 | |
| 203 | void 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 | |
| 232 | void QuickFindWidget::goToCurrentMatch() |
| 233 | { |