summaryrefslogtreecommitdiffstats
path: root/examples/effects
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-26 10:21:10 +0200
committerJason Barron <jbarron@trolltech.com>2009-08-26 11:11:45 +0200
commit01255c3b33de2f72ff0b8802e8bea0ea79998f00 (patch)
treeb0cfa6f76522e4d19bd123658d4fec36545f42ce /examples/effects
parent6eb08228397400be1141611dd96cdad12161d016 (diff)
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')
-rw-r--r--examples/effects/blurpicker/blureffect.cpp2
-rw-r--r--examples/effects/customshader/blureffect.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/effects/blurpicker/blureffect.cpp b/examples/effects/blurpicker/blureffect.cpp
index f0fde4957d..0b806aae12 100644
--- a/examples/effects/blurpicker/blureffect.cpp
+++ b/examples/effects/blurpicker/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);
}
diff --git a/examples/effects/customshader/blureffect.cpp b/examples/effects/customshader/blureffect.cpp
index 8e2a1fe55a..9923324418 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);
}