diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-06 02:46:37 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-06 02:46:37 (GMT) |
commit | 32290f508b2d250cd7a3a783e8b7d2322e676783 (patch) | |
tree | f2ff88dfecfda81cb3fd1f05dcff71647b0cac35 /src/gui/painting | |
parent | 941b13d52d975069d10093a873cd3a55bb2fd7dd (diff) | |
parent | 3b7164b3188e9382510bef2211e82ef777faa75c (diff) | |
download | Qt-32290f508b2d250cd7a3a783e8b7d2322e676783.zip Qt-32290f508b2d250cd7a3a783e8b7d2322e676783.tar.gz Qt-32290f508b2d250cd7a3a783e8b7d2322e676783.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:
Fixed casual crash in initializeDb (Symbian)
Fixed a bug where text would disappear in password fields.
Fixed sendEvent call.
Removed useless member variable and replaced with var on the stack.
Fixed indentation.
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 |