From dccf28b7c344822b7459635099ebe3abdf5fd107 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 17 Apr 2020 17:19:24 +0200 Subject: Remove deprecated members from several QtGui classes Those can be trivially removed as they have direct replacements, or are completely unused. The migration path for QCursor::bitmap and QCursor::mask is QBitmap *pb = c.bitmap(); // up to 5.15, warns in 5.15 QBitmap vb = c.bitmap(Qt::ReturnByValue); // from 5.15, works in 6 QBitmap b = c.bitmap(); // from 6.0 on Change-Id: I3b3acd1c7f09c4c8414e98b3ce11986f1ecd5eda Reviewed-by: Shawn Rutledge --- src/gui/painting/qregion.cpp | 93 -------------------------------------------- 1 file changed, 93 deletions(-) (limited to 'src/gui/painting/qregion.cpp') diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index a10a2cb2d0..8021b17c6b 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -429,9 +429,6 @@ QDebug operator<<(QDebug s, const QRegion &r) \sa united(), operator+() */ -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE -const -#endif QRegion QRegion::operator|(const QRegion &r) const { return united(r); } @@ -441,9 +438,6 @@ QRegion QRegion::operator|(const QRegion &r) const \sa united(), operator|() */ -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE -const -#endif QRegion QRegion::operator+(const QRegion &r) const { return united(r); } @@ -451,9 +445,6 @@ QRegion QRegion::operator+(const QRegion &r) const \overload \since 4.4 */ -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE -const -#endif QRegion QRegion::operator+(const QRect &r) const { return united(r); } @@ -463,9 +454,6 @@ QRegion QRegion::operator+(const QRect &r) const \sa intersected() */ -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE -const -#endif QRegion QRegion::operator&(const QRegion &r) const { return intersected(r); } @@ -473,9 +461,6 @@ QRegion QRegion::operator&(const QRegion &r) const \overload \since 4.4 */ -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE -const -#endif QRegion QRegion::operator&(const QRect &r) const { return intersected(r); @@ -487,9 +472,6 @@ QRegion QRegion::operator&(const QRect &r) const \sa subtracted() */ -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE -const -#endif QRegion QRegion::operator-(const QRegion &r) const { return subtracted(r); } @@ -499,9 +481,6 @@ QRegion QRegion::operator-(const QRegion &r) const \sa xored() */ -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE -const -#endif QRegion QRegion::operator^(const QRegion &r) const { return xored(r); } @@ -743,21 +722,6 @@ QRegion QRegion::intersect(const QRect &r) const returns \c false. */ -/*! - \fn QRegion QRegion::unite(const QRegion &r) const - \obsolete - - Use united(\a r) instead. -*/ - -/*! - \fn QRegion QRegion::unite(const QRect &rect) const - \since 4.4 - \obsolete - - Use united(\a rect) instead. -*/ - /*! \fn QRegion QRegion::united(const QRect &rect) const \since 4.4 @@ -780,21 +744,6 @@ QRegion QRegion::intersect(const QRect &r) const \sa intersected(), subtracted(), xored() */ -/*! - \fn QRegion QRegion::intersect(const QRegion &r) const - \obsolete - - Use intersected(\a r) instead. -*/ - -/*! - \fn QRegion QRegion::intersect(const QRect &rect) const - \since 4.4 - \obsolete - - Use intersected(\a rect) instead. -*/ - /*! \fn QRegion QRegion::intersected(const QRect &rect) const \since 4.4 @@ -817,13 +766,6 @@ QRegion QRegion::intersect(const QRect &r) const \sa subtracted(), united(), xored() */ -/*! - \fn QRegion QRegion::subtract(const QRegion &r) const - \obsolete - - Use subtracted(\a r) instead. -*/ - /*! \fn QRegion QRegion::subtracted(const QRegion &r) const \since 4.2 @@ -838,13 +780,6 @@ QRegion QRegion::intersect(const QRect &r) const \sa intersected(), united(), xored() */ -/*! - \fn QRegion QRegion::eor(const QRegion &r) const - \obsolete - - Use xored(\a r) instead. -*/ - /*! \fn QRegion QRegion::xored(const QRegion &r) const \since 4.2 @@ -866,20 +801,6 @@ QRegion QRegion::intersect(const QRect &r) const gives a rectangle that is QRect::isNull(). */ -#if QT_DEPRECATED_SINCE(5, 11) -/*! - \fn QVector QRegion::rects() const - \obsolete - - Use begin() and end() instead. - - Returns an array of non-overlapping rectangles that make up the - region. - - The union of all the rectangles is equal to the original region. -*/ -#endif - /*! \typedef QRegion::const_iterator \since 5.8 @@ -4312,20 +4233,6 @@ bool qt_region_strictContains(const QRegion ®ion, const QRect &rect) && rect.top() >= r1.top() && rect.bottom() <= r1.bottom()); } -#if QT_DEPRECATED_SINCE(5, 11) -QVector QRegion::rects() const -{ - if (d->qt_rgn) { - d->qt_rgn->vectorize(); - d->qt_rgn->rects.reserve(d->qt_rgn->numRects); - d->qt_rgn->rects.resize(d->qt_rgn->numRects); - return d->qt_rgn->rects; - } else { - return QVector(); - } -} -#endif - QRegion::const_iterator QRegion::begin() const noexcept { return d->qt_rgn ? d->qt_rgn->begin() : nullptr; -- cgit v1.2.3