Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support documenting the generated C++ code #636

Open
LeonMatthesKDAB opened this issue Jul 28, 2023 · 3 comments
Open

Support documenting the generated C++ code #636

LeonMatthesKDAB opened this issue Jul 28, 2023 · 3 comments
Labels
📖 documentation Improvements or additions to documentation ⬆️ feature New feature or request 🙋 good first issue Good for newcomers

Comments

@LeonMatthesKDAB
Copy link
Collaborator

We should consider supporting user documentation on the generated C++.

So if someone writes:

#[cxx_qt::bridge]
mod qobject {
    extern "RustQt" {
         /// A documentation comment
         #[qinvokable]
         fn my_invokable(self: &MyObject);   
    }
}

The A documentation comment should be exported as a Doxygen-compatible documentation comment into the generated C++ code.

@LeonMatthesKDAB LeonMatthesKDAB added 📖 documentation Improvements or additions to documentation ⬆️ feature New feature or request 🙋 good first issue Good for newcomers labels Jul 28, 2023
@ahayzen-kdab
Copy link
Collaborator

Note that we would need to search for any #[doc = "..."] attributes on existing syn blocks then apply these to the generated C++ code.

@LeonMatthesKDAB
Copy link
Collaborator Author

Also questionable what to do for a documentation on a #[qsignal], as that's then declared both in C++, as well as Rust.
Should that show up in both C++ and Rust?
Then what does Rust end up doing with the @arg tags, etc.?

@BenFordTytherington
Copy link
Collaborator

Potentially partially implemented in #1054

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 documentation Improvements or additions to documentation ⬆️ feature New feature or request 🙋 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants