From 133e40283155852585b5fc409909a00e920cfcfc Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 1 Jun 2015 00:22:35 +0200 Subject: De-duplicate vtables, part I: exported private classes By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. In this first batch, we de-inline destructors of exported private classes. Since they are already exported, users of these classes are unaffected by the change, and since it's private API, we don't need to avoid adding code to the out-of-line destructor until Qt 6. Change-Id: I450707877d2cb6a77f79ae1dd355facb98d6c517 Reported-by: Volker Krause Task-number: QTBUG-45582 Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll Reviewed-by: Konstantin Ritt Reviewed-by: Thiago Macieira --- src/gui/painting/qpagedpaintdevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/painting/qpagedpaintdevice.cpp') diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp index 3adc5e9411..547cedf51f 100644 --- a/src/gui/painting/qpagedpaintdevice.cpp +++ b/src/gui/painting/qpagedpaintdevice.cpp @@ -36,6 +36,10 @@ QT_BEGIN_NAMESPACE +QPagedPaintDevicePrivate::~QPagedPaintDevicePrivate() +{ +} + /*! \class QPagedPaintDevice \inmodule QtGui -- cgit v1.2.3