| 112 | } |
| 113 | |
| 114 | void 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 | |
| 143 | void QuickFindWidget::highlightMatches() |
| 144 | { |
nothing calls this directly
no test coverage detected