Text.color can't be compared reliably
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qtdeclarative-opensource-src (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Given the below QML:
import QtQuick 2.4
Text {
id: text
text: 'foobar'
color: foobar
property color foobar: Qt.rgba(0, 0, 0, 0.5)
property color foobar2: foobar
Component.
/*
qml: text: #80000000 #80000000 false 0.5019607843137255
qml: property: #80000000 #80000000 true 0.5000076295109483
*/
}
}
Seems that Text.color stores the colour with a different precision, resulting in Qt.colorEqual() returning false.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: libqt5quick5 5.6.1-4ubuntu3~
ProcVersionSign
Uname: Linux 4.4.0-36-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Sep 1 14:40:27 2016
InstallationDate: Installed on 2016-05-06 (117 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: qtdeclarative-
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in qtdeclarative-opensource-src (Ubuntu): | |
importance: | Undecided → Medium |
Status changed to 'Confirmed' because the bug affects multiple users.