From 7facc281e596f609af39f5fe11652215d4c16d42 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 18 Dec 2015 12:58:28 +0100 Subject: QtWidgets: de-inline some more virtual dtors Helps pinning the vtable to a single TU, which can prevent false negative RTTI (incl. dynamic_cast and catch()). But mostly because it's rather pointless to have dtors of polymophic function inline. Most of the time, the code will be called through the vtable indirection, anyway (which also means that an out-of-line copy of the code needs to exist in any case). The inline method will only be used when the compiler can prove the dynamic type of an object. Saves ~1.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: Ic4ce96da559252c8abc29d880530c84035db2306 Reviewed-by: Thiago Macieira --- src/widgets/effects/qpixmapfilter.cpp | 9 +++++++++ src/widgets/effects/qpixmapfilter_p.h | 1 + 2 files changed, 10 insertions(+) (limited to 'src/widgets/effects') diff --git a/src/widgets/effects/qpixmapfilter.cpp b/src/widgets/effects/qpixmapfilter.cpp index b21726400f..fee8f83305 100644 --- a/src/widgets/effects/qpixmapfilter.cpp +++ b/src/widgets/effects/qpixmapfilter.cpp @@ -1018,6 +1018,15 @@ QPixmapColorizeFilter::QPixmapColorizeFilter(QObject *parent) d->alphaBlend = false; } +/*! + \internal +*/ +QPixmapColorizeFilter::~QPixmapColorizeFilter() +{ + // was inline until Qt 5.6, so essentially + // must stay empty until ### Qt 6 +} + /*! Gets the color of the colorize filter. diff --git a/src/widgets/effects/qpixmapfilter_p.h b/src/widgets/effects/qpixmapfilter_p.h index 6ddd62dcfc..8e0eb08949 100644 --- a/src/widgets/effects/qpixmapfilter_p.h +++ b/src/widgets/effects/qpixmapfilter_p.h @@ -142,6 +142,7 @@ class Q_WIDGETS_EXPORT QPixmapColorizeFilter : public QPixmapFilter public: QPixmapColorizeFilter(QObject *parent = 0); + ~QPixmapColorizeFilter(); void setColor(const QColor& color); QColor color() const; -- cgit v1.2.3