From 8d9d609e637765572d949f01bae47dcc01f2c110 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 1 Jun 2015 00:22:35 +0200 Subject: De-duplicate vtables, part II: exported public 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 second and last batch, we de-inline destructors of exported public classes. Since they are already exported, users of these classes are unaffected by the change, but since it's public API, and the dtors may have been de-virtualized and inlined into application code, we need to avoid adding code to the out-of-line destructor until Qt 6. Change-Id: Ieda9553cb4b0dae7217c37cc7cde321dd7302122 Reported-by: Volker Krause Task-number: QTBUG-45582 Reviewed-by: Friedemann Kleint Reviewed-by: Konstantin Ritt Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/gui/text/qabstracttextdocumentlayout.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/text/qabstracttextdocumentlayout.cpp') diff --git a/src/gui/text/qabstracttextdocumentlayout.cpp b/src/gui/text/qabstracttextdocumentlayout.cpp index 8d2da46ab3..7735fd6b46 100644 --- a/src/gui/text/qabstracttextdocumentlayout.cpp +++ b/src/gui/text/qabstracttextdocumentlayout.cpp @@ -44,6 +44,11 @@ QAbstractTextDocumentLayoutPrivate::~QAbstractTextDocumentLayoutPrivate() { } +QTextObjectInterface::~QTextObjectInterface() +{ + // must be empty until ### Qt 6 +} + /*! \class QAbstractTextDocumentLayout \reentrant -- cgit v1.2.3