| 685 | } |
| 686 | |
| 687 | QModelIndexList MemWatchWidget::simplifySelection() const |
| 688 | { |
| 689 | QModelIndexList simplifiedSelection; |
| 690 | QModelIndexList selection = m_watchView->selectionModel()->selectedRows(); |
| 691 | |
| 692 | // Discard all indexes whose parent is selected already |
| 693 | for (int i = 0; i < selection.count(); ++i) |
| 694 | { |
| 695 | const QModelIndex index = selection.at(i); |
| 696 | if (!isAnyAncestorSelected(index)) |
| 697 | { |
| 698 | simplifiedSelection.append(index); |
| 699 | } |
| 700 | } |
| 701 | return simplifiedSelection; |
| 702 | } |
| 703 | |
| 704 | bool MemWatchWidget::isAnyAncestorSelected(const QModelIndex& index) const |
| 705 | { |
nothing calls this directly
no outgoing calls
no test coverage detected