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:
Olivier Goffart 2022-07-22 10:30:47 +02:00 committed by Olivier Goffart
parent f6a3e741cf
commit ac4f3e97ad
31 changed files with 421 additions and 384 deletions

View file

@ -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) => {