QPaintDevice: Remove reserved without reservations

It was not during all of Qt 5, and nobody found a use for it when
transitioning to Qt 6. It's probably safe to assume that we will not
need it during Qt 6's lifetime either.
This changes shrinks QPaintDevice to 16 bytes (on 64bit systems), and
its child classes like QImage to 24 bytes, meaning that they fit into
QVariant's SSO buffer.

Change-Id: Ic3b020ad43afe45c76ca0c4056a440345a4e139e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
Fabian Kosmale 2020-10-21 23:29:41 +02:00
parent e356ab2c32
commit 47d2f3cfe8
2 changed files with 0 additions and 4 deletions

View File

@ -43,7 +43,6 @@ QT_BEGIN_NAMESPACE
QPaintDevice::QPaintDevice() noexcept
{
reserved = nullptr;
painters = 0;
}

View File

@ -49,7 +49,6 @@ QT_BEGIN_NAMESPACE
class QPaintEngine;
class QPaintDevicePrivate;
class Q_GUI_EXPORT QPaintDevice // device for QPainter
{
@ -100,8 +99,6 @@ protected:
private:
Q_DISABLE_COPY(QPaintDevice)
QPaintDevicePrivate *reserved;
friend class QPainter;
friend class QPainterPrivate;
friend class QFontEngineMac;