From c7465692042826a1f359ac78a288a79e817a1a7d Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 31 Oct 2024 01:24:26 -0700 Subject: [PATCH] typegen: add QSDOC_CREATABLE --- typegen/src/parse.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/typegen/src/parse.rs b/typegen/src/parse.rs index dc4a2eb..35103d8 100644 --- a/typegen/src/parse.rs +++ b/typegen/src/parse.rs @@ -188,6 +188,7 @@ impl CppParser { let mut qml_name = None; let mut singleton = false; let mut uncreatable = false; + let mut force_creatable = false; let mut properties = Vec::new(); let mut default_property = None; let mut invokables = Vec::new(); @@ -228,6 +229,7 @@ impl CppParser { }, "QML_SINGLETON" => singleton = true, "QML_UNCREATABLE" => uncreatable = true, + "QSDOC_CREATABLE" => force_creatable = true, "Q_PROPERTY" | "QSDOC_PROPERTY_OVERRIDE" => { let prop = self.property_regex @@ -377,7 +379,7 @@ impl CppParser { qml_name, superclass: superclass.map(|s| Cow::Borrowed(s)), singleton, - uncreatable, + uncreatable: uncreatable && !force_creatable, comment: comment.map(|v| Comment::new(v, ctx.module)), properties, invokables,