-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for attributes to #[qproperty]
Make it possible to define if only a getter should be generated or only a setter and/or define special getter and setter. Syntax is as follow ```rust struct MyObject { #[qproperty] prop1: f32, // generate default getter and setter #[qproperty(get)] prop2: f32, // generate default getter only #[qproperty(set)] prop3: f32, // generate default setter only #[qproperty(get = Self::prop4_fn)] prop4: f32, // use prop4_fn as getter } ``` WIP since the custom getter part doesn't work yet Signed-off-by: Carl Schwan <[email protected]>
- Loading branch information
Carl Schwan
committed
Feb 20, 2023
1 parent
bf94b05
commit a6171e2
Showing
9 changed files
with
325 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.