qsgdefaultrectanglenode.cpp:221:22: error: narrowing conversion of '(((& c)->QColor::redF() * (&c)->QColor::alphaF()) * 2.55e+2)' from 'qreal {aka double}' to 'unsigned char' inside { } [-fpermissive]
Change-Id: I4f051f07d5db28fd03739343c255cc72d968a99d
Reviewed-on: http://codereview.qt.nokia.com/1004
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
static inline Color4ub colorToColor4ub(const QColor &c)
{
- Color4ub color = { c.redF() * c.alphaF() * 255,
- c.greenF() * c.alphaF() * 255,
- c.blueF() * c.alphaF() * 255,
- c.alphaF() * 255
+ Color4ub color = { uchar(c.redF() * c.alphaF() * 255),
+ uchar(c.greenF() * c.alphaF() * 255),
+ uchar(c.blueF() * c.alphaF() * 255),
+ uchar(c.alphaF() * 255)
};
return color;
}