| 303 | } |
| 304 | |
| 305 | void SearchPanel::OnSearchPanelItemClicked(int row, int) |
| 306 | { |
| 307 | ASSERT_EQUAL(m_results.GetCount(), static_cast<size_t>(m_pTable->rowCount()), ()); |
| 308 | |
| 309 | if (m_results[row].IsSuggest()) |
| 310 | { |
| 311 | // insert suggestion into the search bar |
| 312 | std::string const suggestion = m_results[row].GetSuggestionString(); |
| 313 | m_pEditor->setText(QString::fromUtf8(suggestion.c_str())); |
| 314 | } |
| 315 | else |
| 316 | { |
| 317 | // center viewport on clicked item |
| 318 | GetFramework().ShowSearchResult(m_results[row]); |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | void SearchPanel::hideEvent(QHideEvent *) |
| 323 | { |
nothing calls this directly
no test coverage detected