mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
parent
2643a327e8
commit
a9f526491a
25 changed files with 599 additions and 14 deletions
|
@ -507,12 +507,18 @@ impl ElementType {
|
|||
builtin.additional_accepted_child_types.keys().cloned().collect();
|
||||
valid_children.sort();
|
||||
|
||||
return Err(format!(
|
||||
"{} is not allowed within {}. Only {} are valid children",
|
||||
name,
|
||||
builtin.native_class.class_name,
|
||||
valid_children.join(" ")
|
||||
));
|
||||
let err = if valid_children.is_empty() {
|
||||
format!("{} cannot have children elements", builtin.native_class.class_name,)
|
||||
} else {
|
||||
format!(
|
||||
"{} is not allowed within {}. Only {} are valid children",
|
||||
name,
|
||||
builtin.native_class.class_name,
|
||||
valid_children.join(" ")
|
||||
)
|
||||
};
|
||||
|
||||
return Err(err);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue