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/kernel/qcursor.h | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/gui/kernel/qcursor.h') diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h index 3ae6b98ced..d3b4140ec7 100644 --- a/src/gui/kernel/qcursor.h +++ b/src/gui/kernel/qcursor.h @@ -43,6 +43,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -97,19 +98,13 @@ public: Qt::CursorShape shape() const; void setShape(Qt::CursorShape newShape); -#if QT_DEPRECATED_SINCE(5, 15) - QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value") - const QBitmap *bitmap() const; // ### Qt 7: Remove function +#if QT_DEPRECATED_SINCE(6, 6) + QBitmap bitmap(Qt::ReturnByValueConstant) const { return bitmap(); } + QBitmap mask(Qt::ReturnByValueConstant) const { return mask(); } +#endif // QT_DEPRECATED_SINCE(6, 6) + QBitmap bitmap() const; + QBitmap mask() const; - QT_DEPRECATED_VERSION_X(5, 15, "Use the other overload which returns QBitmap by-value") - const QBitmap *mask() const; // ### Qt 7: Remove function - - QBitmap bitmap(Qt::ReturnByValueConstant) const; - QBitmap mask(Qt::ReturnByValueConstant) const; -#else - QBitmap bitmap(Qt::ReturnByValueConstant = Qt::ReturnByValue) const; // ### Qt 7: Remove arg - QBitmap mask(Qt::ReturnByValueConstant = Qt::ReturnByValue) const; // ### Qt 7: Remove arg -#endif // QT_DEPRECATED_SINCE(5, 15) QPixmap pixmap() const; QPoint hotSpot() const; -- cgit v1.2.3