MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / OnProtocolFormatChanged

Method OnProtocolFormatChanged

DSView/pv/dock/protocoldock.cpp:892–907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890}
891
892void ProtocolDock::OnProtocolFormatChanged(QString format, void *handle){
893 for (auto it = _protocol_lay_items.begin(); it != _protocol_lay_items.end(); it++){
894 if ((*it) == handle){
895 auto lay = (*it);
896 AppConfig::Instance().SetProtocolFormat(lay->m_protocolId.toStdString(), format.toStdString());
897
898 if (lay->m_decoderStatus != NULL)
899 {
900 lay->m_decoderStatus->m_format = DecoderDataFormat::Parse(format.toStdString().c_str());
901 protocol_updated();
902 }
903
904 break;
905 }
906 }
907}
908
909
910bool ProtocolDock::protocol_sort_callback(const DecoderInfoItem *o1, const DecoderInfoItem *o2)

Callers 1

Calls 3

ParseFunction · 0.85
endMethod · 0.45
SetProtocolFormatMethod · 0.45

Tested by

no test coverage detected