summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdatastream/qdatastream.pro
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-09-30 10:41:58 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-09-30 10:46:00 (GMT)
commit5170432e7cb2d0d1adf7ac2ec1ece627c75470f3 (patch)
treee9cca0ad6ba6c59ce1c0477542808e0f063dd7ac /tests/auto/qdatastream/qdatastream.pro
parent45d5832a504516219167f0205901c56035118944 (diff)
downloadQt-5170432e7cb2d0d1adf7ac2ec1ece627c75470f3.zip
Qt-5170432e7cb2d0d1adf7ac2ec1ece627c75470f3.tar.gz
Qt-5170432e7cb2d0d1adf7ac2ec1ece627c75470f3.tar.bz2
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 'tests/auto/qdatastream/qdatastream.pro')
0 files changed, 0 insertions, 0 deletions