Skip to content

Conversation

kawadakk
Copy link
Contributor

This makes it possible to pass a non-'static &VariantTy to ParamSpecVariant::builder in #[derive(Properties)]. Example:

#[derive(Properties)]
#[properties(wrapper_type = super::Foo)]
pub struct Foo {
    #[property(get, set, builder(&<Option<i32>>::static_variant_type()))]
    variant: RefCell<Option<glib::Variant>>,
}

@sdroege sdroege added the needs-backport PR needs backporting to the current stable branch label Sep 20, 2024
@sdroege sdroege merged commit 4cff6e0 into gtk-rs:master Sep 20, 2024
96 checks passed
@kawadakk kawadakk deleted the patch/variant-has-param-spec-builder-fn-nonstatic branch September 20, 2024 07:26
@sdroege sdroege added backported PR was backported to the current stable branch and removed needs-backport PR needs backporting to the current stable branch labels Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported PR was backported to the current stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants