From 47d2f3cfe836be897a737d434140b4be03e9320f Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Wed, 21 Oct 2020 23:29:41 +0200 Subject: 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 --- src/gui/painting/qpaintdevice.cpp | 1 - src/gui/painting/qpaintdevice.h | 3 --- 2 files changed, 4 deletions(-) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qpaintdevice.cpp b/src/gui/painting/qpaintdevice.cpp index 4afb89b52e..07991f2d71 100644 --- a/src/gui/painting/qpaintdevice.cpp +++ b/src/gui/painting/qpaintdevice.cpp @@ -43,7 +43,6 @@ QT_BEGIN_NAMESPACE QPaintDevice::QPaintDevice() noexcept { - reserved = nullptr; painters = 0; } diff --git a/src/gui/painting/qpaintdevice.h b/src/gui/painting/qpaintdevice.h index ca5839e513..5a3b6e600e 100644 --- a/src/gui/painting/qpaintdevice.h +++ b/src/gui/painting/qpaintdevice.h @@ -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; -- cgit v1.2.3