woboq / qmetaobject-rs

Integrate Qml and Rust by building the QMetaObject at compile time.
MIT License
620 stars 89 forks source link

[WIP] Better invokeMethod #303

Open IriaSomobu opened 9 months ago

IriaSomobu commented 9 months ago

This PR is a follow-up of https://github.com/woboq/qmetaobject-rs/pull/302. This PR introduces breaking changes and not to ready to be merged (yet).

Here I want to discuss and implement changes to make invoke_method (and maybe things around it) better.

At first, I've changed invoke_method's return value to Option<QVariant> - which is close to original QMetaObject API and makes it possible to check wether error occurred (this was discussed earlier).

@ogoffart, can you give me advice -- is this change OK as it done now? What should be done next?

IriaSomobu commented 9 months ago

Ah yes, the tests