| 726 | } |
| 727 | |
| 728 | void ProtocolDock::search_nxt() |
| 729 | { |
| 730 | search_update(); |
| 731 | // now the proxy only contains rows that match the name |
| 732 | // let's take the pre one and map it to the original model |
| 733 | if (_model_proxy.rowCount() == 0) { |
| 734 | _table_view->scrollToTop(); |
| 735 | _table_view->clearSelection(); |
| 736 | _matchs_label->setText(QString::number(0)); |
| 737 | _cur_search_index = -1; |
| 738 | return; |
| 739 | } |
| 740 | |
| 741 | int i = 0; |
| 742 | uint64_t rowCount = _model_proxy.rowCount(); |
| 743 | QModelIndex matchingIndex; |
| 744 | pv::data::DecoderModel *decoder_model = _session->get_decoder_model(); |
| 745 | auto decoder_stack = decoder_model->getDecoderStack(); |
| 746 | |
| 747 | if (decoder_stack == NULL){ |
| 748 | dsv_err("decoder_stack is null"); |
| 749 | return; |
| 750 | } |
| 751 | |
| 752 | do { |
| 753 | _cur_search_index++; |
| 754 | if (_cur_search_index < 0 || _cur_search_index >= _model_proxy.rowCount()) |
| 755 | _cur_search_index = 0; |
| 756 | |
| 757 | matchingIndex = _model_proxy.mapToSource(_model_proxy.index(floor(_cur_search_index),_model_proxy.filterKeyColumn())); |
| 758 | |
| 759 | if (!matchingIndex.isValid()) |
| 760 | break; |
| 761 | |
| 762 | i = 1; |
| 763 | uint64_t row = matchingIndex.row() + 1; |
| 764 | uint64_t col = matchingIndex.column(); |
| 765 | pv::data::decode::Annotation ann; |
| 766 | bool ann_valid = false; |
| 767 | |
| 768 | while(i < _str_list.size()) { |
| 769 | QString nxt = _str_list.at(i); |
| 770 | |
| 771 | do { |
| 772 | ann_valid = decoder_stack->list_annotation(&ann, col, row); |
| 773 | row++; |
| 774 | } |
| 775 | while(ann_valid && !ann.is_numberic()); |
| 776 | |
| 777 | if (ann_valid){ |
| 778 | QString source = ann.annotations().at(0); |
| 779 | if (source.contains(nxt)) |
| 780 | i++; |
| 781 | else |
| 782 | break; |
| 783 | } |
| 784 | else{ |
| 785 | break; |
nothing calls this directly
no test coverage detected