diff options
author | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2010-02-05 08:34:48 (GMT) |
---|---|---|
committer | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2010-02-05 08:43:58 (GMT) |
commit | bd36d753337090a2878fc0ca4117e2250c5ae1b7 (patch) | |
tree | 2b5167d71f796f794d0b43e3f0d8cc5d0992ed07 /src/gui/painting/qmath_p.h | |
parent | 96a169ac3f235433906d58ac0e4c613f51c21bf3 (diff) | |
download | Qt-bd36d753337090a2878fc0ca4117e2250c5ae1b7.zip Qt-bd36d753337090a2878fc0ca4117e2250c5ae1b7.tar.gz Qt-bd36d753337090a2878fc0ca4117e2250c5ae1b7.tar.bz2 |
Fixing 'softvfp+vfpv2' compiling issue for Tb9.2
When compiling with -fpu=softvfp+vfpv2 on Tb9.2 we were getting the
segmentattion fault.
This seems to be due to the RVCT bug when it comes to using int->float
(and reverse) castings. One extra level of indirection (function
call) has to be applied.
Task-number: QTBUG-4893
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/painting/qmath_p.h')
-rw-r--r-- | src/gui/painting/qmath_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/painting/qmath_p.h b/src/gui/painting/qmath_p.h index cd9f5ea..8a5f5ab 100644 --- a/src/gui/painting/qmath_p.h +++ b/src/gui/painting/qmath_p.h @@ -54,6 +54,7 @@ // #include <math.h> +#include <qmath.h> QT_BEGIN_NAMESPACE @@ -61,6 +62,11 @@ static const qreal Q_PI = qreal(3.14159265358979323846); // pi static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2 +inline int qIntSqrtInt(int v) +{ + return static_cast<int>(qSqrt(static_cast<qreal>(v))); +} + QT_END_NAMESPACE #endif // QMATH_P_H |