billvaglienti / ProtoGen

Communications protocol generation software
MIT License
30 stars 16 forks source link

Special casting for boolean fields when encoding to a QVariantMap #102

Closed SchrodingersGat closed 4 years ago

SchrodingersGat commented 4 years ago

This PR fixed a "bug" which exists between encoding and decoding boolean values from a QVariantMap

e.g. here is how decoding from a map to a bool currently works:

image

and how the encoding currently works:

image

Changes

So the simple method here is to simply enforce encoding to an integer as follows:

image