mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 14:51:15 +00:00
C++: make the member funciton layout_info and root_item const
It might be called with a const pointer
This commit is contained in:
parent
fde3846392
commit
4b73cce76e
1 changed files with 2 additions and 2 deletions
|
@ -1361,7 +1361,7 @@ fn generate_component(
|
||||||
Access::Public,
|
Access::Public,
|
||||||
Declaration::Function(Function {
|
Declaration::Function(Function {
|
||||||
name: "root_item".to_owned(),
|
name: "root_item".to_owned(),
|
||||||
signature: "()".into(),
|
signature: "() const".into(),
|
||||||
statements: Some(vec![format!("return {};", get_root_item)]),
|
statements: Some(vec![format!("return {};", get_root_item)]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
|
@ -1372,7 +1372,7 @@ fn generate_component(
|
||||||
Declaration::Function(Function {
|
Declaration::Function(Function {
|
||||||
name: "layout_info".into(),
|
name: "layout_info".into(),
|
||||||
signature:
|
signature:
|
||||||
"(sixtyfps::Orientation o, [[maybe_unused]] sixtyfps::private_api::WindowRc *window_handle) -> sixtyfps::LayoutInfo"
|
"(sixtyfps::Orientation o, [[maybe_unused]] const sixtyfps::private_api::WindowRc *window_handle) const -> sixtyfps::LayoutInfo"
|
||||||
.into(),
|
.into(),
|
||||||
statements: Some(layout_info_function_body(
|
statements: Some(layout_info_function_body(
|
||||||
&component,
|
&component,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue