mer-packages/qtdeclarative — pull request #14 by aaronkennedy (2013-08-21 20:10:47+00:00)
Title: [patch] Allow lossless passing of colors in V4

In a binding like

color: enabled?otherColor:"transparent"

V4 stringifies otherColor on return from the conditional, and
re-colorifies it on assignment. As the stringified version of
a color lacks the alpha channel, this loses information.

This patch preserves the alpha information in the V4 register
which allows for lossless color->string->color conversions. If
*any* modification to the intermediate string occurs the alpha
information is discarded. As the only case V4 will stringify a
color and then immediately re-colorify it without modification
is the passthrough case, this is safe .

This is a reasonably hacky way to fix the initial problem, but it
is also reasonably unintrusive and unlikely to have undesirable
side effects. As V4 is being discarded in the next release of Qt,
this is the best approach for now.

Fixes QTBUG-32668.