From 9d95bc58e82c65527a364906eca740151fe3301b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 22 Oct 2012 08:30:32 +0200 Subject: De-inline some destructors in QtWidgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Destructors should be out-of-line so that the compiler doesn't generate one per translation unit. Apart from creating more work for the compiler, it can also lead to duplicated vtables if the dtor is the first virtual function (reimplementation), and all other virtuals are inline, too. Duplicate vtables then break RTTI. In addition, having virtual dtors de-inlined allows us to add code to them in a BC way. As a final argument, this change may lead to less code app-side, since a sequence of cross-DLL calls (to member variable dtors) is replaced by a single cross-DLL call to the new out-of-line dtor. Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1 Reviewed-by: Stephen Kelly Reviewed-by: Friedemann Kleint Reviewed-by: Jędrzej Nowacki --- src/widgets/kernel/qgesture.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/widgets/kernel/qgesture.h') diff --git a/src/widgets/kernel/qgesture.h b/src/widgets/kernel/qgesture.h index b8a719383a..0f09f209c0 100644 --- a/src/widgets/kernel/qgesture.h +++ b/src/widgets/kernel/qgesture.h @@ -118,6 +118,7 @@ class Q_WIDGETS_EXPORT QPanGesture : public QGesture public: explicit QPanGesture(QObject *parent = 0); + ~QPanGesture(); QPointF lastOffset() const; QPointF offset() const; @@ -164,6 +165,7 @@ public: public: explicit QPinchGesture(QObject *parent = 0); + ~QPinchGesture(); ChangeFlags totalChangeFlags() const; void setTotalChangeFlags(ChangeFlags value); @@ -219,6 +221,7 @@ public: enum SwipeDirection { NoDirection, Left, Right, Up, Down }; explicit QSwipeGesture(QObject *parent = 0); + ~QSwipeGesture(); SwipeDirection horizontalDirection() const; SwipeDirection verticalDirection() const; @@ -239,6 +242,7 @@ class Q_WIDGETS_EXPORT QTapGesture : public QGesture public: explicit QTapGesture(QObject *parent = 0); + ~QTapGesture(); QPointF position() const; void setPosition(const QPointF &pos); @@ -256,6 +260,7 @@ class Q_WIDGETS_EXPORT QTapAndHoldGesture : public QGesture public: explicit QTapAndHoldGesture(QObject *parent = 0); + ~QTapAndHoldGesture(); QPointF position() const; void setPosition(const QPointF &pos); -- cgit v1.2.3