typegen: add QSDOC_CREATABLE
This commit is contained in:
		
							parent
							
								
									4bf28f6c43
								
							
						
					
					
						commit
						c746569204
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -188,6 +188,7 @@ impl CppParser {
 | 
				
			||||||
			let mut qml_name = None;
 | 
								let mut qml_name = None;
 | 
				
			||||||
			let mut singleton = false;
 | 
								let mut singleton = false;
 | 
				
			||||||
			let mut uncreatable = false;
 | 
								let mut uncreatable = false;
 | 
				
			||||||
 | 
								let mut force_creatable = false;
 | 
				
			||||||
			let mut properties = Vec::new();
 | 
								let mut properties = Vec::new();
 | 
				
			||||||
			let mut default_property = None;
 | 
								let mut default_property = None;
 | 
				
			||||||
			let mut invokables = Vec::new();
 | 
								let mut invokables = Vec::new();
 | 
				
			||||||
| 
						 | 
					@ -228,6 +229,7 @@ impl CppParser {
 | 
				
			||||||
							},
 | 
												},
 | 
				
			||||||
							"QML_SINGLETON" => singleton = true,
 | 
												"QML_SINGLETON" => singleton = true,
 | 
				
			||||||
							"QML_UNCREATABLE" => uncreatable = true,
 | 
												"QML_UNCREATABLE" => uncreatable = true,
 | 
				
			||||||
 | 
												"QSDOC_CREATABLE" => force_creatable = true,
 | 
				
			||||||
							"Q_PROPERTY" | "QSDOC_PROPERTY_OVERRIDE" => {
 | 
												"Q_PROPERTY" | "QSDOC_PROPERTY_OVERRIDE" => {
 | 
				
			||||||
								let prop =
 | 
													let prop =
 | 
				
			||||||
									self.property_regex
 | 
														self.property_regex
 | 
				
			||||||
| 
						 | 
					@ -377,7 +379,7 @@ impl CppParser {
 | 
				
			||||||
				qml_name,
 | 
									qml_name,
 | 
				
			||||||
				superclass: superclass.map(|s| Cow::Borrowed(s)),
 | 
									superclass: superclass.map(|s| Cow::Borrowed(s)),
 | 
				
			||||||
				singleton,
 | 
									singleton,
 | 
				
			||||||
				uncreatable,
 | 
									uncreatable: uncreatable && !force_creatable,
 | 
				
			||||||
				comment: comment.map(|v| Comment::new(v, ctx.module)),
 | 
									comment: comment.map(|v| Comment::new(v, ctx.module)),
 | 
				
			||||||
				properties,
 | 
									properties,
 | 
				
			||||||
				invokables,
 | 
									invokables,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue