X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fdecodetrace.cpp;h=5b9b3f36c586568111684bfbfc73fd491b1a208e;hb=cf1541a18fcd007c9965a3199b9c4f917856b292;hp=2902c936552757ee1c88160a32d0f2b8d24ca82a;hpb=f6a93932056dab5e2f75207b65197b436d4141a5;p=pulseview.git diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index 2902c936..5b9b3f36 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -1131,10 +1131,9 @@ QComboBox* DecodeTrace::create_channel_selector(QWidget *parent, const DecodeCha for (const shared_ptr &b : sig_list) { assert(b); if (b->logic_data() && b->enabled()) { - selector->addItem(b->name(), - QVariant::fromValue((void*)b.get())); + selector->addItem(b->name(), QVariant::fromValue(b)); - if (ch->assigned_signal == b.get()) + if (ch->assigned_signal == b) selector->setCurrentIndex(selector->count() - 1); } } @@ -1523,8 +1522,8 @@ void DecodeTrace::on_channel_selected(int) QComboBox *cb = qobject_cast(QObject::sender()); // Determine signal that was selected - const data::SignalBase *signal = - (data::SignalBase*)cb->itemData(cb->currentIndex()).value(); + shared_ptr signal = + cb->itemData(cb->currentIndex()).value>(); // Determine decode channel ID this combo box is the channel selector for const uint16_t id = channel_id_map_.at(cb);