Mark obsolete methods in qregion as deprecated

Make them inline as well, so they don't
create symbols.

Change-Id: I779103d6752e75809d16632c8c0eb374cdbd9705
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
This commit is contained in:
Lars Knoll 2012-01-15 21:59:10 +01:00 committed by Qt by Nokia
parent cf0d5d4554
commit 445c4cb011
2 changed files with 20 additions and 19 deletions

View File

@ -3930,7 +3930,7 @@ void QRegion::translate(int dx, int dy)
OffsetRegion(*d->qt_rgn, dx, dy);
}
QRegion QRegion::unite(const QRegion &r) const
QRegion QRegion::united(const QRegion &r) const
{
if (isEmptyHelper(d->qt_rgn))
return r;
@ -3993,7 +3993,7 @@ QRegion& QRegion::operator+=(const QRegion &r)
}
}
QRegion QRegion::unite(const QRect &r) const
QRegion QRegion::united(const QRect &r) const
{
if (isEmptyHelper(d->qt_rgn))
return r;
@ -4054,7 +4054,7 @@ QRegion& QRegion::operator+=(const QRect &r)
}
}
QRegion QRegion::intersect(const QRegion &r) const
QRegion QRegion::intersected(const QRegion &r) const
{
if (isEmptyHelper(d->qt_rgn) || isEmptyHelper(r.d->qt_rgn)
|| !EXTENTCHECK(&d->qt_rgn->extents, &r.d->qt_rgn->extents))
@ -4099,7 +4099,7 @@ QRegion QRegion::intersect(const QRegion &r) const
return result;
}
QRegion QRegion::intersect(const QRect &r) const
QRegion QRegion::intersected(const QRect &r) const
{
if (isEmptyHelper(d->qt_rgn) || r.isEmpty()
|| !EXTENTCHECK(&d->qt_rgn->extents, &r))
@ -4125,7 +4125,7 @@ QRegion QRegion::intersect(const QRect &r) const
return result;
}
QRegion QRegion::subtract(const QRegion &r) const
QRegion QRegion::subtracted(const QRegion &r) const
{
if (isEmptyHelper(d->qt_rgn) || isEmptyHelper(r.d->qt_rgn))
return *this;
@ -4150,7 +4150,7 @@ QRegion QRegion::subtract(const QRegion &r) const
return result;
}
QRegion QRegion::eor(const QRegion &r) const
QRegion QRegion::xored(const QRegion &r) const
{
if (isEmptyHelper(d->qt_rgn)) {
return r;

View File

@ -92,20 +92,21 @@ public:
QRegion translated(int dx, int dy) const;
inline QRegion translated(const QPoint &p) const { return translated(p.x(), p.y()); }
// ### Qt 5: make these four functions QT4_SUPPORT
QRegion unite(const QRegion &r) const;
QRegion unite(const QRect &r) const;
QRegion intersect(const QRegion &r) const;
QRegion intersect(const QRect &r) const;
QRegion subtract(const QRegion &r) const;
QRegion eor(const QRegion &r) const;
QRegion united(const QRegion &r) const;
QRegion united(const QRect &r) const;
QRegion intersected(const QRegion &r) const;
QRegion intersected(const QRect &r) const;
QRegion subtracted(const QRegion &r) const;
QRegion xored(const QRegion &r) const;
inline QRegion united(const QRegion &r) const { return unite(r); }
inline QRegion united(const QRect &r) const { return unite(r); }
inline QRegion intersected(const QRegion &r) const { return intersect(r); }
inline QRegion intersected(const QRect &r) const { return intersect(r); }
inline QRegion subtracted(const QRegion &r) const { return subtract(r); }
inline QRegion xored(const QRegion &r) const { return eor(r); }
#if QT_DEPRECATED_SINCE(5, 0)
inline QT_DEPRECATED QRegion unite(const QRegion &r) const { return united(r); }
inline QT_DEPRECATED QRegion unite(const QRect &r) const { return united(r); }
inline QT_DEPRECATED QRegion intersect(const QRegion &r) const { return intersected(r); }
inline QT_DEPRECATED QRegion intersect(const QRect &r) const { return intersected(r); }
inline QT_DEPRECATED QRegion subtract(const QRegion &r) const { return subtracted(r); }
inline QT_DEPRECATED QRegion eor(const QRegion &r) const { return xored(r); }
#endif
bool intersects(const QRegion &r) const;
bool intersects(const QRect &r) const;