Summary: | Invalid QString conversion in TreeModel.data.fieldname | ||
---|---|---|---|
Product: | [Developer tools] rust-qt-binding-generator | Reporter: | kdebuac.rhn |
Component: | general | Assignee: | Jos van den Oever <jos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Workaround |
Description
kdebuac.rhn
2018-04-10 09:04:06 UTC
Created attachment 111974 [details]
Workaround
This works around the issue, and fixes failing test cases. Untested with rustByValue.
I'm not sure if the patch is actually the right place to tackle this problem. I would try to fix the behaviour of "rustByValue", but the way it's used seems opposite to me and I dare not touch it: { let data = (&*ptr).%3(); set(p, %5data.into()); } )").arg(o.name, base, snakeCase(p.name), p.type.name, p.rustByValue ?"&" :""); In the above snippet, the generated code will use a *reference* &data.into() iff rustByValue is *true*. Is this reversed? This issue is fixed as of 57d557378ee629496b4a6afc58022f0677cdff06. The struct qstring_t is not present anymore. QString data is now passed as two pieces of data: the pointer to the characters and the length. |