diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-10-22 08:30:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-06 12:40:55 +0100 |
commit | 9d95bc58e82c65527a364906eca740151fe3301b (patch) | |
tree | 78b85f2c8fc2863bb973a8ed091e5b9a45cc84a2 /src/widgets/styles/qstyleoption.cpp | |
parent | 65755f9a68947e774c640ce92c022d677acdcc4a (diff) |
De-inline some destructors in QtWidgets
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 <stephen.kelly@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/widgets/styles/qstyleoption.cpp')
-rw-r--r-- | src/widgets/styles/qstyleoption.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp index 53c1cf4559..3bc0c053b9 100644 --- a/src/widgets/styles/qstyleoption.cpp +++ b/src/widgets/styles/qstyleoption.cpp @@ -3889,6 +3889,13 @@ QStyleHintReturnMask::QStyleHintReturnMask() : QStyleHintReturn(Version, Type) } /*! + Destructor. +*/ +QStyleHintReturnMask::~QStyleHintReturnMask() +{ +} + +/*! \enum QStyleHintReturnMask::StyleOptionType This enum is used to hold information about the type of the style option, and @@ -3942,6 +3949,13 @@ QStyleHintReturnVariant::QStyleHintReturnVariant() : QStyleHintReturn(Version, T } /*! + Destructor. +*/ +QStyleHintReturnVariant::~QStyleHintReturnVariant() +{ +} + +/*! \enum QStyleHintReturnVariant::StyleOptionType This enum is used to hold information about the type of the style option, and |