ubuntu-sdk-bugs team mailing list archive
-
ubuntu-sdk-bugs team
-
Mailing list archive
-
Message #07109
[Bug 1619281] [NEW] Text.color can't be compared reliably
Public bug reported:
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.onCompleted: {
console.log("text:", text.color, foobar, Qt.colorEqual(text.color, foobar), text.color.a);
console.log("property:", foobar2, foobar, Qt.colorEqual(foobar2, foobar), foobar2.a);
/*
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~xenialoverlay1~1 [origin: LP-PPA-ci-train-ppa-service-stable-phone-overlay]
ProcVersionSignature: Ubuntu 4.4.0-36.55-generic 4.4.16
Uname: Linux 4.4.0-36-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
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-opensource-src
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: qtdeclarative-opensource-src (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug third-party-packages xenial
--
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtdeclarative-opensource-src in
Ubuntu.
https://bugs.launchpad.net/bugs/1619281
Title:
Text.color can't be compared reliably
Status in qtdeclarative-opensource-src package in Ubuntu:
New
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.onCompleted: {
console.log("text:", text.color, foobar, Qt.colorEqual(text.color, foobar), text.color.a);
console.log("property:", foobar2, foobar, Qt.colorEqual(foobar2, foobar), foobar2.a);
/*
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~xenialoverlay1~1 [origin: LP-PPA-ci-train-ppa-service-stable-phone-overlay]
ProcVersionSignature: Ubuntu 4.4.0-36.55-generic 4.4.16
Uname: Linux 4.4.0-36-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl
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-opensource-src
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtdeclarative-opensource-src/+bug/1619281/+subscriptions