summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-02-14 07:02:53 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-02-15 09:08:16 +0100
commit3ec76f82bab883b02d6ddf0bcc8ab4a6802292c9 (patch)
tree7de78921d80ae53f660c48bbba6d34b2e3dd9589
parent9b6c288281fc09223067d9f51a350ae1e43aadcd (diff)
QBitmap: de-inline dtor
The destructor of this polymorphic class was incorrectly marked for removal in Qt 6, and, unfortunately, that was carried out. Now it delivers one of the most-duplicated vtables across all of Qt (at least four duplicates), and we can never add anything to it until Qt 7 (because existing code de-virtualized it as a no-op). Task-number: QTBUG-45582 Pick-to: 6.3 Change-Id: I85bd3b13dca9f1fc8cb62ca079a1168a33f71323 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/gui/image/qbitmap.cpp6
-rw-r--r--src/gui/image/qbitmap.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/image/qbitmap.cpp b/src/gui/image/qbitmap.cpp
index e8733885a5..e2abb935e7 100644
--- a/src/gui/image/qbitmap.cpp
+++ b/src/gui/image/qbitmap.cpp
@@ -133,6 +133,12 @@ QBitmap::QBitmap(const QSize &size)
}
/*!
+ \internal
+ This dtor must stay empty until Qt 7 (was inline until 6.2).
+*/
+QBitmap::~QBitmap() = default;
+
+/*!
\fn QBitmap::clear()
Clears the bitmap, setting all its bits to Qt::color0.
diff --git a/src/gui/image/qbitmap.h b/src/gui/image/qbitmap.h
index 9052e62db6..518e349c0a 100644
--- a/src/gui/image/qbitmap.h
+++ b/src/gui/image/qbitmap.h
@@ -58,6 +58,7 @@ public:
QBitmap(int w, int h);
explicit QBitmap(const QSize &);
explicit QBitmap(const QString &fileName, const char *format = nullptr);
+ ~QBitmap() override;
#if QT_DEPRECATED_SINCE(6, 0)
QT_DEPRECATED_VERSION_X_6_0("Use fromPixmap instead.") QBitmap &operator=(const QPixmap &);