diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qbitmap.cpp | 4 | ||||
-rw-r--r-- | src/gui/image/qbitmap.h | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp index 54a4dc646b..e8405a6d11 100644 --- a/src/gui/image/qbitmap.cpp +++ b/src/gui/image/qbitmap.cpp @@ -196,6 +196,8 @@ QBitmap &QBitmap::operator=(const QPixmap &pixmap) return *this; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + /*! Destroys the bitmap. */ @@ -203,6 +205,8 @@ QBitmap::~QBitmap() { } +#endif + /*! \fn void QBitmap::swap(QBitmap &other) \since 4.8 diff --git a/src/gui/image/qbitmap.h b/src/gui/image/qbitmap.h index 878aeaafa3..68727e74b5 100644 --- a/src/gui/image/qbitmap.h +++ b/src/gui/image/qbitmap.h @@ -55,7 +55,14 @@ public: QBitmap(int w, int h); explicit QBitmap(const QSize &); explicit QBitmap(const QString &fileName, const char *format = Q_NULLPTR); + // ### Qt 6: don't inherit QPixmap +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QBitmap(const QBitmap &other) : QPixmap(other) {} + // QBitmap(QBitmap &&other) : QPixmap(std::move(other)) {} // QPixmap doesn't, yet, have a move ctor + QBitmap &operator=(const QBitmap &other) { QPixmap::operator=(other); return *this; } + QBitmap &operator=(QBitmap &&other) Q_DECL_NOTHROW { QPixmap::operator=(std::move(other)); return *this; } ~QBitmap(); +#endif QBitmap &operator=(const QPixmap &); inline void swap(QBitmap &other) { QPixmap::swap(other); } // prevent QBitmap<->QPixmap swaps |