summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
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/graphicsview
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/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp7
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget_p.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
index 3e39f1f418..3ea04efc6b 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
@@ -205,6 +205,13 @@ QGraphicsProxyWidgetPrivate::QGraphicsProxyWidgetPrivate()
/*!
\internal
*/
+QGraphicsProxyWidgetPrivate::~QGraphicsProxyWidgetPrivate()
+{
+}
+
+/*!
+ \internal
+*/
void QGraphicsProxyWidgetPrivate::init()
{
Q_Q(QGraphicsProxyWidget);
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget_p.h b/src/widgets/graphicsview/qgraphicsproxywidget_p.h
index 8229374111..30607f22af 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget_p.h
+++ b/src/widgets/graphicsview/qgraphicsproxywidget_p.h
@@ -57,6 +57,7 @@ class QGraphicsProxyWidgetPrivate : public QGraphicsWidgetPrivate
Q_DECLARE_PUBLIC(QGraphicsProxyWidget)
public:
QGraphicsProxyWidgetPrivate();
+ ~QGraphicsProxyWidgetPrivate();
void init();
void sendWidgetMouseEvent(QGraphicsSceneMouseEvent *event);