diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-26 08:21:10 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-26 09:11:45 (GMT) |
commit | 01255c3b33de2f72ff0b8802e8bea0ea79998f00 (patch) | |
tree | b0cfa6f76522e4d19bd123658d4fec36545f42ce /examples/effects/customshader | |
parent | 6eb08228397400be1141611dd96cdad12161d016 (diff) | |
download | Qt-01255c3b33de2f72ff0b8802e8bea0ea79998f00.zip Qt-01255c3b33de2f72ff0b8802e8bea0ea79998f00.tar.gz Qt-01255c3b33de2f72ff0b8802e8bea0ea79998f00.tar.bz2 |
Make the 'effects' examples compile when qreal == float.
All of the types supplied to qBound() must be the same and in the case
where qreal is typedef'ed to a float, this is not the case because the
outer 2 arguments are considered doubles. We explicitly cast them to
qreal to guarantee they are all the same type.
Reviewed-by: bnilsen
Diffstat (limited to 'examples/effects/customshader')
-rw-r--r-- | examples/effects/customshader/blureffect.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp index 8e2a1fe..9923324 100644 --- a/examples/effects/customshader/blureffect.cpp +++ b/examples/effects/customshader/blureffect.cpp @@ -52,7 +52,7 @@ BlurEffect::BlurEffect(QGraphicsItem *item) void BlurEffect::adjustForItem() { qreal y = m_baseLine - item->pos().y(); - qreal radius = qBound(0.0, y / 32, 16.0); + qreal radius = qBound(qreal(0.0), y / 32, qreal(16.0)); setBlurRadius(radius); } |