From 3ec76f82bab883b02d6ddf0bcc8ab4a6802292c9 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 14 Feb 2022 07:02:53 +0100 Subject: [PATCH] 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 --- src/gui/image/qbitmap.cpp | 6 ++++++ src/gui/image/qbitmap.h | 1 + 2 files changed, 7 insertions(+) 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 @@ -132,6 +132,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() 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 &);