X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fviews%2Ftrace%2Fdecodetrace.cpp;h=0b09439bb8bb4e28976b30102995aa5e60607d8d;hb=009fc9ae42ecccd3802f549b39c19a2ba895959d;hp=e9b046c2d86bb088389f53682b6d8f6732248ffe;hpb=85125b0f34be424fdf8a8a5133f2494722077d7d;p=pulseview.git diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index e9b046c2..0b09439b 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -1142,7 +1142,7 @@ QComboBox* DecodeTrace::create_channel_selector(QWidget *parent, const DecodeCha QComboBox *selector = new QComboBox(parent); - selector->addItem("-", qVariantFromValue((void*)nullptr)); + selector->addItem("-", QVariant::fromValue((void*)nullptr)); if (!ch->assigned_signal) selector->setCurrentIndex(0); @@ -1151,7 +1151,7 @@ QComboBox* DecodeTrace::create_channel_selector(QWidget *parent, const DecodeCha assert(b); if (b->logic_data() && b->enabled()) { selector->addItem(b->name(), - qVariantFromValue((void*)b.get())); + QVariant::fromValue((void*)b.get())); if (ch->assigned_signal == b.get()) selector->setCurrentIndex(selector->count() - 1); @@ -1166,9 +1166,9 @@ QComboBox* DecodeTrace::create_channel_selector_init_state(QWidget *parent, { QComboBox *selector = new QComboBox(parent); - selector->addItem("0", qVariantFromValue((int)SRD_INITIAL_PIN_LOW)); - selector->addItem("1", qVariantFromValue((int)SRD_INITIAL_PIN_HIGH)); - selector->addItem("X", qVariantFromValue((int)SRD_INITIAL_PIN_SAME_AS_SAMPLE0)); + selector->addItem("0", QVariant::fromValue((int)SRD_INITIAL_PIN_LOW)); + selector->addItem("1", QVariant::fromValue((int)SRD_INITIAL_PIN_HIGH)); + selector->addItem("X", QVariant::fromValue((int)SRD_INITIAL_PIN_SAME_AS_SAMPLE0)); selector->setCurrentIndex(ch->initial_pin_state); @@ -1340,7 +1340,7 @@ void DecodeTrace::initialize_row_widgets(DecodeTraceRow* r, unsigned int row_id) for (const AnnotationClass* ann_class : ann_classes) { cb = new QCheckBox(); cb->setText(tr(ann_class->description)); - cb->setChecked(ann_class->visible); + cb->setChecked(ann_class->visible()); int dim = ViewItemPaintParams::text_height() - 2; QPixmap pixmap(dim, dim); @@ -1621,7 +1621,7 @@ void DecodeTrace::on_show_hide_class(QWidget* sender) assert(ann_class_ptr); AnnotationClass* ann_class = (AnnotationClass*)ann_class_ptr; - ann_class->visible = !ann_class->visible; + ann_class->set_visible(!ann_class->visible()); void* row_ptr = sender->property("decode_trace_row_ptr").value(); assert(row_ptr);