mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Add support for protected functions
Protected function can only be called from the direct base Issue #3636
This commit is contained in:
parent
351ae4b93c
commit
8f001ac490
11 changed files with 142 additions and 17 deletions
|
@ -413,6 +413,7 @@ impl ElementType {
|
|||
property_visibility: PropertyVisibility::Private,
|
||||
declared_pure: None,
|
||||
is_local_to_component: false,
|
||||
is_in_direct_base: false,
|
||||
}
|
||||
} else {
|
||||
crate::typeregister::reserved_property(name)
|
||||
|
@ -424,6 +425,7 @@ impl ElementType {
|
|||
property_visibility: p.property_visibility,
|
||||
declared_pure: None,
|
||||
is_local_to_component: false,
|
||||
is_in_direct_base: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -441,6 +443,7 @@ impl ElementType {
|
|||
property_visibility: PropertyVisibility::InOut,
|
||||
declared_pure: None,
|
||||
is_local_to_component: false,
|
||||
is_in_direct_base: false,
|
||||
}
|
||||
}
|
||||
_ => PropertyLookupResult {
|
||||
|
@ -449,6 +452,7 @@ impl ElementType {
|
|||
property_visibility: PropertyVisibility::Private,
|
||||
declared_pure: None,
|
||||
is_local_to_component: false,
|
||||
is_in_direct_base: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -705,6 +709,8 @@ pub struct PropertyLookupResult<'a> {
|
|||
pub declared_pure: Option<bool>,
|
||||
/// True if the property is part of the the current component (for visibility purposes)
|
||||
pub is_local_to_component: bool,
|
||||
/// True if the property in the direct base of the component (for visibility purposes)
|
||||
pub is_in_direct_base: bool,
|
||||
}
|
||||
|
||||
impl<'a> PropertyLookupResult<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue