Skip to content

Pass in the cfg_evaluator to cxx-qt-gen and consider when generating C++ #1133

Closed
@ahayzen-kdab

Description

@ahayzen-kdab

Along with #1132 once we are handling cfg everywhere we need to also ensure that our C++ calls the cfg_evaluator from the build system so that it can determine which headers / source need to be generated.

Otherwise if you have

extern "RustQt" {
   #[qobject]
   type MyObject = ....;

   #[cfg(...)]
   #[cxx_name = "method"]
   fn method_a(&MyObject);

   #[cfg(...)]
   #[cxx_name = "method"]
   fn method_b(&MyObject);
}

This fails as on the C++ side it generates two functions of void method() const noexcept and void method() const.

Metadata

Metadata

Assignees

Labels

🥳🎉 1.0This issue is part of stabilization for 1.0 release

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions