Updated functions to accept and return strings
Details
Diff Detail
- Repository
- R881 Rust Qt Binding Generator
- Branch
- function-generation
- Lint
No Linters Available - Unit
No Unit Test Coverage
Example of use can be found in todo https://github.com/keeslinp/qml_todo.
I'm sure there are probably improvements that can be made, I've just been pretty busy so I wanted to get something submitted while I had the chance so we can work from there.
Looking good. I tested with some simple functions with bool and QString and I'm happy to have this feature.
This is a significant feature so a/some unit tests in tests would be good.
For now functions should accept and return only simple types, not ones that are defined in the binding. Please add a check for that.
'void' return type is not supported yet. It is the most basic type.
'void' is not a supported type. Use one of bool quint8 (u8) qint32 (i32) quint32 (u32) quint64 (u64) float (f32) QString (String) QByteArray (Vec<u8>) Demo Fibonacci FibonacciList FileSystemTree Processes TimeSeries
src/cpp.cpp | ||
---|---|---|
522 | Add a new line after function declaration. |
- Added unit test for function, cleaned up an missing endline, added void, and added check for dynamic types
I think I got the check for user-declared types correct. I assume that pretty much excludes all Object types?
Great patch, Pearce!
I suggest you push this patch yourself. Please apply for developer account.
https://identity.kde.org/index.php?r=developerApplication
You can point to this comment as a reference for the application.