mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Change slint enum values to be PascalCase in rust
... while still being kebab-case in .slint Some enums might become public API and we want to have them as PascalCase to respect the rust conventions
This commit is contained in:
parent
f6a3e741cf
commit
ac4f3e97ad
31 changed files with 421 additions and 384 deletions
|
@ -1925,7 +1925,7 @@ fn compile_expression(expr: &Expression, ctx: &EvaluationContext) -> TokenStream
|
|||
}
|
||||
Expression::EnumerationValue(value) => {
|
||||
let base_ident = ident(&value.enumeration.name);
|
||||
let value_ident = ident(&value.to_string());
|
||||
let value_ident = ident(&value.to_pascal_case());
|
||||
quote!(slint::re_exports::#base_ident::#value_ident)
|
||||
}
|
||||
Expression::ReturnStatement(expr) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue