layout_.addRow(&filter_buttons_bar_);
// Connect the check-box signal mapper
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ connect(&check_box_mapper_, SIGNAL(mappedObject(QObject*)),
+ this, SLOT(on_channel_checked(QObject*)));
+#else
connect(&check_box_mapper_, SIGNAL(mapped(QWidget*)),
this, SLOT(on_channel_checked(QWidget*)));
+#endif
}
void Channels::set_all_channels(bool set)
for (auto& entry : device->channel_groups()) {
const shared_ptr<ChannelGroup> group = entry.second;
- try {
- QLabel* label = group_label_map_.at(group);
+ if (group_label_map_.count(group) > 0) {
+ QLabel* label = group_label_map_[group];
label->setText(QString("<h3>%1</h3>").arg(group->name().c_str()));
- } catch (out_of_range&) {
- // Do nothing
}
}
updating_channels_ = false;
}
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+void Channels::on_channel_checked(QObject *widget)
+#else
void Channels::on_channel_checked(QWidget *widget)
+#endif
{
if (updating_channels_)
return;