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

@ -21,7 +21,7 @@ fn enums(path: &Path) -> anyhow::Result<()> {
writeln!(enums, "enum class {} {{", stringify!($Name))?;
$(
$(writeln!(enums, " ///{}", $value_doc)?;)*
writeln!(enums, " {},", i_slint_common::enums::cpp_escape_keyword(stringify!($Value).trim_start_matches("r#")))?;
writeln!(enums, " {},", stringify!($Value).trim_start_matches("r#"))?;
)*
writeln!(enums, "}};")?;
)*