return;
}
- disconnect(this, SLOT(on_data_received()));
- disconnect(this, SLOT(on_enabled_changed()));
+ disconnect(&session_, SIGNAL(data_received()), this, SLOT(on_data_received()));
+
+ for (const shared_ptr<SignalBase>& sb : session_.signalbases()) {
+ if (sb->analog_data())
+ disconnect(sb->analog_data().get(), nullptr, this, SLOT(on_data_received()));
+ disconnect(sb.get(), nullptr, this, SLOT(on_enabled_changed()));
+ }
fnc_sample_ = new fnc_sample<double>(*this);
if (error_message_.isEmpty()) {
// Connect to the session data notification if we have no input signals
if (input_signals_.empty())
- connect(&session_, SIGNAL(data_received()),
- this, SLOT(on_data_received()));
+ connect(&session_, SIGNAL(data_received()), this, SLOT(on_data_received()));
gen_interrupt_ = false;
gen_thread_ = std::thread(&MathSignal::generation_proc, this);
sample_count_supported_ = true;
// Add notification of reconfigure events
- disconnect(this, SLOT(on_config_changed()));
+ // Note: No need to disconnect the previous signal as that QObject instance is destroyed
connect(&opts->binding(), SIGNAL(config_changed()),
this, SLOT(on_config_changed()));
return;
}
- disconnect(this, SLOT(on_annotation_visibility_changed()));
+ for (const shared_ptr<Decoder>& dec : signal_->decoder_stack())
+ disconnect(dec.get(), nullptr, this, SLOT(on_annotation_visibility_changed()));
all_annotations_ = signal->get_all_annotations_by_segment(current_segment);
signal_ = signal;