diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-01 00:22:35 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-06-03 12:02:59 +0000 |
commit | 8d9d609e637765572d949f01bae47dcc01f2c110 (patch) | |
tree | 64d18e47b7ab23202a1864c209a6ec606f285192 /src/gui/text/qabstracttextdocumentlayout.h | |
parent | 133e40283155852585b5fc409909a00e920cfcfc (diff) |
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 <volker.krause@kdab.com>
Task-number: QTBUG-45582
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/text/qabstracttextdocumentlayout.h')
-rw-r--r-- | src/gui/text/qabstracttextdocumentlayout.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qabstracttextdocumentlayout.h b/src/gui/text/qabstracttextdocumentlayout.h index 27135b0476..68e7a0e4e9 100644 --- a/src/gui/text/qabstracttextdocumentlayout.h +++ b/src/gui/text/qabstracttextdocumentlayout.h @@ -126,7 +126,7 @@ private: class Q_GUI_EXPORT QTextObjectInterface { public: - virtual ~QTextObjectInterface() {} + virtual ~QTextObjectInterface(); virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) = 0; virtual void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format) = 0; }; |