diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-06-29 18:20:52 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-01 15:00:39 +0200 |
commit | 5b84efd6c321b9e7ffb850bae3eebb8325eac725 (patch) | |
tree | 14d2f9751a551a07ec1d04027318b0eb3fc9109a /src/declarative/scenegraph | |
parent | 890648a91b266a889ac5c4d20acad2fe8ecb11e3 (diff) |
Fix compilation
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>
Diffstat (limited to 'src/declarative/scenegraph')
-rw-r--r-- | src/declarative/scenegraph/qsgdefaultrectanglenode.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/scenegraph/qsgdefaultrectanglenode.cpp b/src/declarative/scenegraph/qsgdefaultrectanglenode.cpp index 34a6db4f78..a153a11f31 100644 --- a/src/declarative/scenegraph/qsgdefaultrectanglenode.cpp +++ b/src/declarative/scenegraph/qsgdefaultrectanglenode.cpp @@ -214,10 +214,10 @@ Color4ub operator +(Color4ub a, Color4ub b) { a.a += b.a; a.r += b.r; a.g += b. 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; } |