summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qregion.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-07-30 11:55:17 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-07-30 11:57:36 (GMT)
commit9fb11e5c2e8127e2916e1cf9b51f676effc9d31e (patch)
treeb699875ecbc50d83688d8a9770aa6b40c659966e /src/gui/painting/qregion.cpp
parent04f7834fcd8db4ecb6a4c53de42ac83f571b37c8 (diff)
downloadQt-9fb11e5c2e8127e2916e1cf9b51f676effc9d31e.zip
Qt-9fb11e5c2e8127e2916e1cf9b51f676effc9d31e.tar.gz
Qt-9fb11e5c2e8127e2916e1cf9b51f676effc9d31e.tar.bz2
Reviewed-by: Thomas H.
Squashed commit of the following: commit fcf7e8cab339d0cf9f3f2a9756d7754c54c4d934 Author: Gunnar Sletta <gunnar@trolltech.com> Date: Thu Jul 30 13:15:13 2009 +0200 note in the changes file... commit 2c9c3880215988e6609c290a8e738b228736e601 Author: Gunnar Sletta <gunnar@trolltech.com> Date: Thu Jul 30 12:51:42 2009 +0200 Don't leak native window HRGN handles commit 6bb30d2075dd1d71a8a600d25f413a38af7f2f2c Author: Gunnar Sletta <gunnar@trolltech.com> Date: Thu Jul 30 11:09:22 2009 +0200 Moved qregion_wince.cpp -> qregion_win.cpp, platforms are identical now commit 173fcc5baec73a198167985c6f777987e6015a71 Author: Gunnar Sletta <gunnar@trolltech.com> Date: Thu Jul 30 09:42:06 2009 +0200 win32 calls on QRegion.handle() is no longer supported, use from HRGN commit d7ddcce4ba29b70ed81f85274208b388a2bb9d4d Author: Gunnar Sletta <gunnar@trolltech.com> Date: Thu Jul 30 09:41:37 2009 +0200 Added convenience function to convert from HRGN to QRegion commit 2fc53ac3d59a9c42bb4154fff7557610092b7946 Author: Gunnar Sletta <gunnar@trolltech.com> Date: Wed Jul 29 09:28:10 2009 +0200 Kill qregion_win.cpp and use the unix code instead
Diffstat (limited to 'src/gui/painting/qregion.cpp')
-rw-r--r--src/gui/painting/qregion.cpp28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 762e9e0..d59f3ff 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -49,7 +49,7 @@
#include <qdebug.h>
-#if defined(Q_OS_UNIX) || defined(Q_OS_WINCE)
+#if defined(Q_OS_UNIX) || defined(Q_WS_WIN)
#include "qimage.h"
#include "qbitmap.h"
#include <stdlib.h>
@@ -545,7 +545,7 @@ QRegion& QRegion::operator|=(const QRegion &r)
\sa intersected()
*/
-#if !defined (Q_OS_UNIX) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_UNIX) && !defined (Q_WS_WIN)
QRegion& QRegion::operator+=(const QRect &r)
{
return operator+=(QRegion(r));
@@ -561,16 +561,14 @@ QRegion& QRegion::operator+=(const QRect &r)
\sa intersected()
*/
-#if !defined(Q_WS_WIN) || defined(Q_OS_WINCE)
QRegion& QRegion::operator&=(const QRegion &r)
{ return *this = *this & r; }
-#endif
/*!
\overload
\since 4.4
*/
-#if defined (Q_OS_UNIX) || defined (Q_OS_WINCE)
+#if defined (Q_OS_UNIX) || defined (Q_WS_WIN)
QRegion& QRegion::operator&=(const QRect &r)
{
return *this = *this & r;
@@ -591,10 +589,8 @@ QRegion& QRegion::operator&=(const QRect &r)
\sa subtracted()
*/
-#if !defined(Q_WS_WIN) || defined(Q_OS_WINCE)
QRegion& QRegion::operator-=(const QRegion &r)
{ return *this = *this - r; }
-#endif
/*!
Applies the xored() function to this region and \a r and
@@ -731,7 +727,7 @@ bool QRegion::intersects(const QRect &rect) const
return false;
}
-#if !defined (Q_OS_UNIX) && !defined (Q_OS_WINCE)
+#if !defined (Q_OS_UNIX) && !defined (Q_WS_WIN)
/*!
\overload
\since 4.4
@@ -1086,7 +1082,7 @@ Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath(const QRegion &region)
return result;
}
-#if defined(Q_OS_UNIX) || defined(Q_OS_WINCE)
+#if defined(Q_OS_UNIX) || defined(Q_WS_WIN)
//#define QT_REGION_DEBUG
/*
@@ -1627,9 +1623,9 @@ QT_END_INCLUDE_NAMESPACE
QT_BEGIN_INCLUDE_NAMESPACE
# include "qregion_mac.cpp"
QT_END_INCLUDE_NAMESPACE
-#elif defined(Q_OS_WINCE)
+#elif defined(Q_WS_WIN)
QT_BEGIN_INCLUDE_NAMESPACE
-# include "qregion_wince.cpp"
+# include "qregion_win.cpp"
QT_END_INCLUDE_NAMESPACE
#elif defined(Q_WS_QWS)
static QRegionPrivate qrp;
@@ -3829,7 +3825,7 @@ QRegion::QRegion(const QRect &r, RegionType t)
#if defined(Q_WS_X11)
d->rgn = 0;
d->xrectangles = 0;
-#elif defined(Q_OS_WINCE)
+#elif defined(Q_WS_WIN)
d->rgn = 0;
#endif
if (t == Rectangle) {
@@ -3851,7 +3847,7 @@ QRegion::QRegion(const QPolygon &a, Qt::FillRule fillRule)
#if defined(Q_WS_X11)
d->rgn = 0;
d->xrectangles = 0;
-#elif defined(Q_OS_WINCE)
+#elif defined(Q_WS_WIN)
d->rgn = 0;
#endif
d->qt_rgn = PolygonRegion(a.constData(), a.size(),
@@ -3881,7 +3877,7 @@ QRegion::QRegion(const QBitmap &bm)
#if defined(Q_WS_X11)
d->rgn = 0;
d->xrectangles = 0;
-#elif defined(Q_OS_WINCE)
+#elif defined(Q_WS_WIN)
d->rgn = 0;
#endif
d->qt_rgn = qt_bitmapToRegion(bm);
@@ -3896,7 +3892,7 @@ void QRegion::cleanUp(QRegion::QRegionData *x)
XDestroyRegion(x->rgn);
if (x->xrectangles)
free(x->xrectangles);
-#elif defined(Q_OS_WINCE)
+#elif defined(Q_WS_WIN)
if (x->rgn)
qt_win_dispose_rgn(x->rgn);
#endif
@@ -3932,7 +3928,7 @@ QRegion QRegion::copy() const
#if defined(Q_WS_X11)
x->rgn = 0;
x->xrectangles = 0;
-#elif defined(Q_OS_WINCE)
+#elif defined(Q_WS_WIN)
x->rgn = 0;
#endif
if (d->qt_rgn)