diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-17 17:19:24 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-04-27 12:21:29 +0200 |
commit | dccf28b7c344822b7459635099ebe3abdf5fd107 (patch) | |
tree | 3acab7b16c02f87ace113cc2f0cc8d9598e219e4 /src/gui/painting | |
parent | 4ba25a092065a6422510a9f4afa4fbbabeda686c (diff) |
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 <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qbrush.cpp | 14 | ||||
-rw-r--r-- | src/gui/painting/qcolor.cpp | 22 | ||||
-rw-r--r-- | src/gui/painting/qcolor.h | 6 | ||||
-rw-r--r-- | src/gui/painting/qregion.cpp | 93 | ||||
-rw-r--r-- | src/gui/painting/qregion.h | 26 |
5 files changed, 2 insertions, 159 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index c8fc447446..172d51a487 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -908,20 +908,6 @@ void QBrush::setTransform(const QTransform &matrix) } -#if QT_DEPRECATED_SINCE(5, 15) -/*! - \fn void QBrush::matrix() const - \since 4.2 - \obsolete - - Use transform() instead. - - Returns the current transformation matrix for the brush. - - \sa setMatrix() -*/ -#endif // QT_DEPRECATED_SINCE(5, 15) - /*! \fn bool QBrush::operator!=(const QBrush &brush) const diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index eac2a50c8c..d9d32f6219 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -2870,28 +2870,6 @@ QColor QColor::darker(int factor) const noexcept return hsv.convertTo(cspec); } -#if QT_DEPRECATED_SINCE(5, 13) -/*! - \obsolete - - Use lighter(\a factor) instead. -*/ -QColor QColor::light(int factor) const noexcept -{ - return lighter(factor); -} - -/*! - \obsolete - - Use darker(\a factor) instead. -*/ -QColor QColor::dark(int factor) const noexcept -{ - return darker(factor); -} -#endif - /*! \overload Assigns a copy of \a color and returns a reference to this color. */ diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h index ad624e6b60..683826fbe7 100644 --- a/src/gui/painting/qcolor.h +++ b/src/gui/painting/qcolor.h @@ -215,12 +215,6 @@ public: static QColor fromHsl(int h, int s, int l, int a = 255); static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0); -#if QT_DEPRECATED_SINCE(5, 13) - QT_DEPRECATED_X("Use QColor::lighter() instead") - Q_REQUIRED_RESULT QColor light(int f = 150) const noexcept; - QT_DEPRECATED_X("Use QColor::darker() instead") - Q_REQUIRED_RESULT QColor dark(int f = 200) const noexcept; -#endif Q_REQUIRED_RESULT QColor lighter(int f = 150) const noexcept; Q_REQUIRED_RESULT QColor darker(int f = 200) const noexcept; 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); } @@ -744,21 +723,6 @@ QRegion QRegion::intersect(const QRect &r) const */ /*! - \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 @@ -781,21 +745,6 @@ QRegion QRegion::intersect(const QRect &r) const */ /*! - \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 @@ -818,13 +767,6 @@ QRegion QRegion::intersect(const QRect &r) const */ /*! - \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 @@ -839,13 +781,6 @@ QRegion QRegion::intersect(const QRect &r) const */ /*! - \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<QRect> 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<QRect> 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<QRect>(); - } -} -#endif - QRegion::const_iterator QRegion::begin() const noexcept { return d->qt_rgn ? d->qt_rgn->begin() : nullptr; diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h index 54de916198..dac58bd2eb 100644 --- a/src/gui/painting/qregion.h +++ b/src/gui/painting/qregion.h @@ -107,35 +107,13 @@ public: Q_REQUIRED_RESULT QRegion subtracted(const QRegion &r) const; Q_REQUIRED_RESULT QRegion xored(const QRegion &r) const; -#if QT_DEPRECATED_SINCE(5, 0) - Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion unite(const QRegion &r) const { return united(r); } - Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion unite(const QRect &r) const { return united(r); } - Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion intersect(const QRegion &r) const { return intersected(r); } - Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion intersect(const QRect &r) const { return intersected(r); } - Q_REQUIRED_RESULT inline QT_DEPRECATED QRegion subtract(const QRegion &r) const { return subtracted(r); } - Q_REQUIRED_RESULT 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; QRect boundingRect() const noexcept; -#if QT_DEPRECATED_SINCE(5, 11) - QT_DEPRECATED_X("Use begin()/end() instead") - QVector<QRect> rects() const; -#endif void setRects(const QRect *rect, int num); int rectCount() const noexcept; -#ifdef Q_COMPILER_MANGLES_RETURN_TYPE - // ### Qt 6: remove these, they're kept for MSVC compat - const QRegion operator|(const QRegion &r) const; - const QRegion operator+(const QRegion &r) const; - const QRegion operator+(const QRect &r) const; - const QRegion operator&(const QRegion &r) const; - const QRegion operator&(const QRect &r) const; - const QRegion operator-(const QRegion &r) const; - const QRegion operator^(const QRegion &r) const; -#else + QRegion operator|(const QRegion &r) const; QRegion operator+(const QRegion &r) const; QRegion operator+(const QRect &r) const; @@ -143,7 +121,7 @@ public: QRegion operator&(const QRect &r) const; QRegion operator-(const QRegion &r) const; QRegion operator^(const QRegion &r) const; -#endif // Q_COMPILER_MANGLES_RETURN_TYPE + QRegion& operator|=(const QRegion &r); QRegion& operator+=(const QRegion &r); QRegion& operator+=(const QRect &r); |