- 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()));
+ }