From: Tom Feist Date: Sun, 9 Nov 2014 22:54:53 +0000 (+0000) Subject: Change Glib::Variant to Glib::Variant. X-Git-Tag: pulseview-0.3.0~519 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=15289d5c8736152f7f8ef37bb6e22b186ca7bd2d;p=pulseview.git Change Glib::Variant to Glib::Variant. This is needed on OSX/x86_64 where one is a typedef to unsigned long and the other to unsigned long long. Both are the same size, but they are still considered different types for the purposes of template instantiation, so the specialisations which are defined for Glib::Variant are not found if Glib::Variant is used. --- diff --git a/pv/toolbars/samplingbar.cpp b/pv/toolbars/samplingbar.cpp index 14990d81..3d4e723f 100644 --- a/pv/toolbars/samplingbar.cpp +++ b/pv/toolbars/samplingbar.cpp @@ -237,7 +237,7 @@ void SamplingBar::update_sample_rate_selector_value() try { auto gvar = device->config_get(ConfigKey::SAMPLERATE); uint64_t samplerate = - Glib::VariantBase::cast_dynamic>(gvar).get(); + Glib::VariantBase::cast_dynamic>(gvar).get(); assert(!_updating_sample_rate); _updating_sample_rate = true; _sample_rate.set_value(samplerate); @@ -333,7 +333,7 @@ void SamplingBar::update_device_config_widgets() if (capabilities.count(Capability::SET)) { device->config_set(ConfigKey::LIMIT_FRAMES, - Glib::Variant::create(1)); + Glib::Variant::create(1)); on_config_changed(); } break; @@ -373,7 +373,7 @@ void SamplingBar::commit_sample_count() { try { device->config_set(ConfigKey::LIMIT_SAMPLES, - Glib::Variant::create(sample_count)); + Glib::Variant::create(sample_count)); on_config_changed(); } catch (Error error) { qDebug() << "Failed to configure sample count."; @@ -403,7 +403,7 @@ void SamplingBar::commit_sample_rate() _updating_sample_rate = true; try { device->config_set(ConfigKey::SAMPLERATE, - Glib::Variant::create(sample_rate)); + Glib::Variant::create(sample_rate)); on_config_changed(); } catch (Error error) { qDebug() << "Failed to configure samplerate.";