summaryrefslogtreecommitdiffstats
path: root/src/widgets/effects
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-12-18 12:58:28 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-12-21 22:16:19 +0000
commit7facc281e596f609af39f5fe11652215d4c16d42 (patch)
tree36c273e6ebf8ac64a22a0ac0528446672b589f26 /src/widgets/effects
parent11c8823ff77c417e03f643afe63c714f0d07dc6c (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/effects')
-rw-r--r--src/widgets/effects/qpixmapfilter.cpp9
-rw-r--r--src/widgets/effects/qpixmapfilter_p.h1
2 files changed, 10 insertions, 0 deletions
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
@@ -1019,6 +1019,15 @@ QPixmapColorizeFilter::QPixmapColorizeFilter(QObject *parent)
}
/*!
+ \internal
+*/
+QPixmapColorizeFilter::~QPixmapColorizeFilter()
+{
+ // was inline until Qt 5.6, so essentially
+ // must stay empty until ### Qt 6
+}
+
+/*!
Gets the color of the colorize filter.
\internal
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;