path: root/examples/
diff options
authorMilian Wolff <>2014-01-10 11:38:55 +0100
committerThe Qt Project <>2014-01-10 14:46:14 +0100
commitc1f4f8e626f3d5c2a2d6112e727ae0d15248cf19 (patch)
treec55947e57e2aedd808420cab8e5676b98baca5b2 /examples/
parent625c881cc74f2552e211b9ba81ac3b0ed30e9947 (diff)
Properly convert JSON data to target type of function parameter.
This used to work but broke in one of the last few commits apparently. Now we add a proper unit test to ensure it stays working. The issue was that JSON only knows e.g. numeric types stored as double. When we then try to call a method taking an int with the VariantArgument that tries to convert the double to int, we failed and produced an invalid QVariant which then converts to 0. Now we use the appropriate API to convert the JSON data to the correct target type before calling the method. Furthermore, it became clear that we can greatly cleanup the VariantArgument thanks to that. It now is reduced to just a QVariant wrapper class with an implicit cast operator to QGenericArgument. Change-Id: Ieaf60f548ea9584e7d760f9cd935da455787f376 Reviewed-by: Simon Hausmann <>
Diffstat (limited to 'examples/')
0 files changed, 0 insertions, 0 deletions