-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.8.0 RC, 5.9.1
-
None
-
Linux yoga 4.7.6-1-ARCH #1 SMP PREEMPT Fri Sep 30 19:28:42 CEST 2016 x86_64 GNU/Linux
Testcase:
import QtQuick 2.0 import QtTest 1.0 TestCase { name: "color" property color tmp: '#800000' property color tmp2 function test_hsv_set() { tmp2 = tmp tmp2.hsvHue = 0 console.log( tmp, [tmp.r, tmp.g, tmp.b, tmp.a], [tmp.hsvHue, tmp.hsvSaturation, tmp.hsvValue, tmp.hslLightness] ) console.log( tmp2, [tmp2.r, tmp2.g, tmp2.b, tmp2.a], [tmp2.hsvHue, tmp2.hsvSaturation, tmp2.hsvValue, tmp2.hslLightness] ) verify(Qt.colorEqual(tmp, "#800000"), "tmp") verify(Qt.colorEqual(tmp2, "#800000"), "tmp2") verify(Qt.colorEqual(tmp, tmp2), "tmp == tmp2") } function test_hsl_set() { tmp2 = tmp tmp2.hslHue = 0 verify(Qt.colorEqual(tmp, "#800000"), "tmp") verify(Qt.colorEqual(tmp2, "#800000"), "tmp2") verify(Qt.colorEqual(tmp, tmp2), "tmp == tmp2") } }
Note that the original hue is 0 and the assigned hue is also 0, and that all properties are equal.
- relates to
-
QTBUG-84436 QColor operator== documentation need more details
-
- Closed
-
-
QTBUG-134722 ColorEqual fails correctly comparing rgba constructed colors with hsva constructed colors
-
- Open
-