diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-05 13:05:02 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-05 13:05:02 (GMT) |
commit | ddc571f494e228b279878ce66efe6f205906d44f (patch) | |
tree | 0adf1c799e853ba9390b169157c223ec8ea836ae /src/gui/painting | |
parent | b5a5c7ce06291d4f9cae15383bd35677db277138 (diff) | |
parent | 95012c3ca7ef52ea8f2a2ecb67987b8575758987 (diff) | |
download | Qt-ddc571f494e228b279878ce66efe6f205906d44f.zip Qt-ddc571f494e228b279878ce66efe6f205906d44f.tar.gz Qt-ddc571f494e228b279878ce66efe6f205906d44f.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Fix to S60 softkey pressed down image.
Whitespace/tab fixes.
s60 application loses normalGeometry when returning from fullscreen
Fixing 'softvfp+vfpv2' compiling issue for Tb9.2
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/qmath_p.h | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 194dda3..660a2a8 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -2408,7 +2408,11 @@ static inline int soft_light_op(int dst, int src, int da, int sa) else if (4 * dst <= da) return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025; else { +# ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2 + return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025; +# else return (dst * sa * 255 + da * (src2 - sa) * (int(sqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025; +# endif } } 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 |