QColor stores RGB colour with 16 bits per channel, so "0.5" would
convert to 32768 (i.e. round(0.5 * 65535)), or 0x8000.

If you convert down to 8 bits per channel, you'll have 0x80.  If you
convert that value back up to 16 bits per channel, you'll have 0x8080.
And finally, converting that to floating point gives you 0.50196.

So you'll probably need to adjust the tests to accept an error on the
order of 1/(2*255) in these values.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1619281

Title:
  Text.color can't be compared reliably

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtdeclarative-opensource-src/+bug/1619281/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to