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

cxx-qt-gen: use the module name or attribute for the CXX file names #283

Merged

Conversation

ahayzen-kdab
Copy link
Collaborator

So that we can support multiple QObjects later in one module block, use the module name or cxx_stem attribute as the output file name.

Later if the Rust API is ever stable we could use the inspection APIs on Span to read the filename of the macro. This would mean we would be the same as CXX but this requires nightly.

@LeonMatthesKDAB
Copy link
Collaborator

How would you feel about renaming cxx_stem to cxx_file_stem or even cxx_filename_stem?
This might be a non-native-speaker problem, but I didn't understand right away why that was the name of the attribute and how that refers to the filename.

@ahayzen-kdab
Copy link
Collaborator Author

How would you feel about renaming cxx_stem to cxx_file_stem or even cxx_filename_stem? This might be a non-native-speaker problem, but I didn't understand right away why that was the name of the attribute and how that refers to the filename.

We could go for cxx_file_stem

@ahayzen-kdab ahayzen-kdab force-pushed the use-module-or-attr-for-file-name branch from e94d077 to f70e57f Compare October 6, 2022 09:16
@LeonMatthesKDAB
Copy link
Collaborator

How would you feel about renaming cxx_stem to cxx_file_stem or even cxx_filename_stem? This might be a non-native-speaker problem, but I didn't understand right away why that was the name of the attribute and how that refers to the filename.

We could go for cxx_file_stem

That would be great, I'll approve then.

@ahayzen-kdab
Copy link
Collaborator Author

Done :-)

@ahayzen-kdab ahayzen-kdab force-pushed the use-module-or-attr-for-file-name branch from f70e57f to 717accd Compare October 6, 2022 09:54
LeonMatthesKDAB
LeonMatthesKDAB previously approved these changes Oct 6, 2022
Copy link
Collaborator

@LeonMatthesKDAB LeonMatthesKDAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

So that we can support multiple QObjects later in one module block,
use the module name or cxx_stem attribute as the output file name.

Later if the Rust API is ever stable we could use the inspection
APIs on Span to read the filename of the macro. This would mean
we would be the same as CXX but this requires nightly.
@LeonMatthesKDAB LeonMatthesKDAB merged commit ee5db35 into KDAB:main Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use the module name for the generated file name for now, with a macro file_stem to override
2 participants