summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-05-25 07:55:55 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-05-25 07:55:55 (GMT)
commitacc6122892a33b845da32b1d5b30dc6852c17e73 (patch)
tree978a84a77a6bccff08bace60d47a6b14cd9eefd2 /src/gui/painting
parent43eccd4e52402b9020a0cf26aa1486784f8abe0e (diff)
parent4147a2c788c39f09ef87181768a779cb701fd2bd (diff)
downloadQt-acc6122892a33b845da32b1d5b30dc6852c17e73.zip
Qt-acc6122892a33b845da32b1d5b30dc6852c17e73.tar.gz
Qt-acc6122892a33b845da32b1d5b30dc6852c17e73.tar.bz2
Merge branch 'master' into graphics-master
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qdrawhelper.cpp8
-rw-r--r--src/gui/painting/qtransform.h14
2 files changed, 4 insertions, 18 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index fdd0c21..bbe1a76 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -6930,7 +6930,7 @@ static void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer,
}
void qt_build_pow_tables() {
- qreal smoothing = 1.7;
+ qreal smoothing = qreal(1.7);
#ifdef Q_WS_MAC
// decided by testing a few things on an iMac, should probably get this from the
@@ -6952,15 +6952,15 @@ void qt_build_pow_tables() {
}
#else
for (int i=0; i<256; ++i) {
- qt_pow_rgb_gamma[i] = uchar(qRound(pow(i / 255.0, smoothing) * 255));
- qt_pow_rgb_invgamma[i] = uchar(qRound(pow(i / 255.0, 1 / smoothing) * 255));
+ qt_pow_rgb_gamma[i] = uchar(qRound(pow(i / qreal(255.0), smoothing) * 255));
+ qt_pow_rgb_invgamma[i] = uchar(qRound(pow(i / qreal(255.), 1 / smoothing) * 255));
}
#endif
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
const qreal gray_gamma = 2.31;
for (int i=0; i<256; ++i)
- qt_pow_gamma[i] = uint(qRound(pow(i / 255.0, gray_gamma) * 2047));
+ qt_pow_gamma[i] = uint(qRound(pow(i / qreal(255.), gray_gamma) * 2047));
for (int i=0; i<2048; ++i)
qt_pow_invgamma[i] = uchar(qRound(pow(i / 2047.0, 1 / gray_gamma) * 255));
#endif
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 7e93f74..aac7c31 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -275,13 +275,6 @@ inline qreal QTransform::dy() const
return affine._dy;
}
-#if defined(Q_CC_GNU)
-# define Q_CC_GNU_VERSION (((__GNUC__)<<16)|((__GNUC_MINOR__)<<8)|(__GNUC_PATCHLEVEL__))
-# if Q_CC_GNU_VERSION >= 0x040201
-# pragma GCC diagnostic ignored "-Wfloat-equal"
-# endif
-#endif
-
inline QTransform &QTransform::operator*=(qreal num)
{
if (num == 1.)
@@ -338,13 +331,6 @@ inline QTransform &QTransform::operator-=(qreal num)
return *this;
}
-#if defined(Q_CC_GNU_VERSION)
-# if Q_CC_GNU_VERSION >= 0x040201
-# pragma GCC diagnostic warning "-Wfloat-equal"
-# endif
-# undef Q_CC_GNU_VERSION
-#endif
-
/****** stream functions *******************/
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTransform &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTransform &);