Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions glib-macros/tests/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ mod foo {
string_vec: RefCell<Vec<String>>,
#[property(get, set, builder(glib::VariantTy::DOUBLE))]
variant: RefCell<Option<glib::Variant>>,
#[property(get, set, builder(&<Option<i32>>::static_variant_type()))]
variant2: RefCell<Option<glib::Variant>>,
#[property(get = |_| 42.0, set)]
infer_inline_type: RefCell<f64>,
// The following property doesn't store any data. The value of the property is calculated
Expand Down
3 changes: 1 addition & 2 deletions glib/src/param_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2307,8 +2307,7 @@ has_simple_spec!(bool, ParamSpecBoolean, ParamSpecBooleanBuilder);
impl HasParamSpec for crate::Variant {
type ParamSpec = ParamSpecVariant;
type SetValue = Self;
type BuilderFn =
fn(&'static str, ty: &'static crate::VariantTy) -> ParamSpecVariantBuilder<'static>;
type BuilderFn = for<'a> fn(&'a str, ty: &'a crate::VariantTy) -> ParamSpecVariantBuilder<'a>;

fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder
Expand Down
Loading