summaryrefslogtreecommitdiffstats
path: root/examples/webkit
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-09-30 12:41:58 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-09-30 12:46:00 +0200
commit5170432e7cb2d0d1adf7ac2ec1ece627c75470f3 (patch)
treee9cca0ad6ba6c59ce1c0477542808e0f063dd7ac /examples/webkit
parent45d5832a504516219167f0205901c56035118944 (diff)
Fix floating point precision when using qreal with QDataStream
A frequent bug when using QDataStream across platforms where the size of qreal is different (such as any desktop platform and an ARM device) is that you end up using different overloads for streaming the value in and out (e.g. operator>>(double) on desktop and operator<<(float) on ARM.) This can leads to crashes and data corruption. To avoid the problem, we define a single floating point precision for the entire data stream and allow this to be set by the user. The default is to use 64-bit precision for all floating point numbers. Reviewed-by: Samuel Reviewed-by: Thiago
Diffstat (limited to 'examples/webkit')
0 files changed, 0 insertions, 0 deletions