| 818 | } |
| 819 | |
| 820 | void ProtocolDock::search_update() |
| 821 | { |
| 822 | if (!_search_edited) |
| 823 | return; |
| 824 | |
| 825 | pv::data::DecoderModel *decoder_model = _session->get_decoder_model(); |
| 826 | |
| 827 | auto decoder_stack = decoder_model->getDecoderStack(); |
| 828 | if (!decoder_stack) |
| 829 | return; |
| 830 | |
| 831 | if (decoder_stack->list_annotation_size(_model_proxy.filterKeyColumn()) > ProgressRows) { |
| 832 | QFuture<void> future; |
| 833 | future = QtConcurrent::run([&]{ |
| 834 | search_done(); |
| 835 | }); |
| 836 | Qt::WindowFlags flags = Qt::CustomizeWindowHint; |
| 837 | QProgressDialog dlg(L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SEARCHING), "Searching..."), |
| 838 | L_S(STR_PAGE_DLG, S_ID(IDS_DLG_CANCEL), "Cancel"),0,0,this,flags); |
| 839 | dlg.setWindowModality(Qt::WindowModal); |
| 840 | dlg.setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | |
| 841 | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint); |
| 842 | dlg.setCancelButton(NULL); |
| 843 | |
| 844 | QFutureWatcher<void> watcher; |
| 845 | connect(&watcher,SIGNAL(finished()),&dlg,SLOT(cancel())); |
| 846 | watcher.setFuture(future); |
| 847 | |
| 848 | dlg.exec(); |
| 849 | } else { |
| 850 | search_done(); |
| 851 | } |
| 852 | _search_edited = false; |
| 853 | } |
| 854 | |
| 855 | //-------------------IProtocolItemLayerCallback |
| 856 | void ProtocolDock::OnProtocolSetting(void *handle){ |
nothing calls this directly
no test coverage detected