Summary:
After enabling 2018 edition on my cargo project, the use statements
generated in the interface module no longer resolve.
Prefixing module paths with `crate::` brings things back into alignment.
Unsure if this is how you'd like to approach the issue, but I'm happy to revise the patch based on your feedback.
Test Plan:
STEPS TO REPRODUCE
1. create a new cargo project based on the template
2. update your toolchain to >= 1.31
3. add `edition = "2018"` to the package section of your Cargo.toml
4. run `cargo build`
OBSERVED RESULT
Build fails since generated code tries to import crate-local modules as if they are top level crates.
EXPECTED RESULT
Build completes successfully.
Reviewers: vandenoever
Differential Revision: https://phabricator.kde.org/D17447
When an object calls into C++, that C++ code may again call into Rust.
The original call might have an immutable reference and the nested
call could receive a mutable reference. That is not allowed and
undefined behaviour. For this reason, calling into C++ is only allowed
from mutable objects.
Summary:
Avoid potential clashes on symbols/macros from other libraries
Allows to use the generated header in projects which have
DQT_NO_SIGNALS_SLOTS_KEYWORDS or DQT_NO_KEYWORDS set
Reviewers: vandenoever
Reviewed By: vandenoever
Differential Revision: https://phabricator.kde.org/D15545
Summary:
Compiler complains about generated code with
warning: this statement may fall through
and is slightly right, as the code might fall through if a role is used
which is not catched for a column.
Reviewers: vandenoever
Reviewed By: vandenoever
Differential Revision: https://phabricator.kde.org/D15541
rustByFunction lets a getter get a value even if it is not possible
to return a value by reference.
rustByFunction passes a getter function in the getter. This can be
called with the value instead of returning a reference.