| 567 | } |
| 568 | |
| 569 | void FormSearchControl::onSort(int, Qt::SortOrder) |
| 570 | { |
| 571 | // We want to achieve: none -> descending -> ascending -> none |
| 572 | // The headerview flips the indicator with the logic: |
| 573 | // if (same_section) |
| 574 | // new_order = old_order == descending ? ascending : descending |
| 575 | // else |
| 576 | // new_order = InitialSortOrder (else ascending) |
| 577 | QHeaderView *header = ui->results->horizontalHeader(); |
| 578 | |
| 579 | if (proxy->order == Qt::AscendingOrder && proxy->column != -1) |
| 580 | { |
| 581 | header->setSortIndicatorShown(false); |
| 582 | header->setSortIndicator(-1, Qt::DescendingOrder); |
| 583 | proxy->column = -1; |
| 584 | } |
| 585 | else |
| 586 | { |
| 587 | header->setSortIndicatorShown(true); |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | void FormSearchControl::searchResult(uint64_t seed) |
| 592 | { |
nothing calls this directly
no outgoing calls
no test coverage detected