cxx-qt
cxx-qt copied to clipboard
Do not use signals as Rust mod
https://github.com/KDAB/cxx-qt/blob/main/examples/qml_features/src/signals.rs
In this rust file, the signals
word was used. It will generate a signals.cxxqt.h
header file where signals will be used as its namespace. It will cause a problem that signals
will be replaced by the Qt macro so that the MOC file will fail to be generated.
Heh, a fun one :-)
But if we are building with QT_NO_KEYWORDS
(like we have in the root CMake) is this a problem? As then it's not signals
but Q_SIGNALS
?
Hm, it's an example
, not a test
, so probably best to fix this, unless someone tries to copy that code into their own CMake and have things break.
Should just be a simple rename.
Right, with the new API though, i think this won't be a problem and will be "fixed" ? As you will need to specify a namespace yourself etc
Fair point
So with 0.4 there are a few changes here
- Namespaces need to be written by the developer (so we don't just pick
signals
automatically) - The actual example has changed and it's now called RustSignals / rust_signals
So now i think this example will work correctly and not collide ? Therefore I'm closing this issue.
Once 0.4 is out and if this issue still occurs then please open a new issue :-)