| 446 | } |
| 447 | |
| 448 | void ProtocolDock::decoded_progress(int progress) |
| 449 | { |
| 450 | const auto &decode_sigs = _session->get_decode_signals(); |
| 451 | unsigned int index = 0; |
| 452 | |
| 453 | for(auto d : decode_sigs) { |
| 454 | int pg = d->get_progress(); |
| 455 | QString err; |
| 456 | |
| 457 | if (d->decoder()->out_of_memory()) |
| 458 | err = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_OUT_OF_MEMORY), "Out of Memory"); |
| 459 | |
| 460 | if (index < _protocol_lay_items.size()) |
| 461 | { |
| 462 | ProtocolItemLayer &lay = *(_protocol_lay_items.at(index)); |
| 463 | lay.SetProgress(pg, err); |
| 464 | |
| 465 | // have custom data format |
| 466 | if (pg == 100 && lay.m_decoderStatus != NULL){ |
| 467 | lay.enable_format(lay.m_decoderStatus->m_bNumeric); |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | index++; |
| 472 | } |
| 473 | |
| 474 | if (progress == 0 || progress % 10 == 1){ |
| 475 | update_model(); |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | void ProtocolDock::set_model() |
| 480 | { |
nothing calls this directly
no test coverage detected