With older glibmm versions the following error occured:
pv/toolbars/mainbar.cpp:228:6: error: no match for ‘operator!’ (operand
type is ‘Glib::VariantContainerBase’)
if (!gvar_dict) {
^
Work around the above issue by using .gobj() and not relying on
"Glib::VariantBase::operator BoolExpr() const", which was only
added in glibmm 2.36.
This fixes bug #548.
Tested on a Debian stable system with glibmm 2.32.1 and Boost 1.49.
}
}
- if (!gvar_dict) {
+ if (!gvar_dict.gobj()) {
sample_rate_.show_none();
updating_sample_rate_ = false;
return;
try {
auto gvar =
device->config_list(ConfigKey::LIMIT_SAMPLES);
- if (gvar)
+ if (gvar.gobj())
g_variant_get(gvar.gobj(), "(tt)",
&min_sample_count, &max_sample_count);
} catch(const sigrok::Error &e) {