De-inline some destructors in QtWidgets
authorMarc Mutz <marc.mutz@kdab.com>
Mon, 22 Oct 2012 06:30:32 +0000 (08:30 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 6 Nov 2012 11:40:55 +0000 (12:40 +0100)
commit9d95bc58e82c65527a364906eca740151fe3301b
tree78b85f2c8fc2863bb973a8ed091e5b9a45cc84a2
parent65755f9a68947e774c640ce92c022d677acdcc4a
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>
30 files changed:
src/widgets/dialogs/qwizard.cpp
src/widgets/dialogs/qwizard.h
src/widgets/graphicsview/qgraphicsitem.cpp
src/widgets/graphicsview/qgraphicsitem.h
src/widgets/kernel/qgesture.cpp
src/widgets/kernel/qgesture.h
src/widgets/kernel/qlayoutitem.cpp
src/widgets/kernel/qlayoutitem.h
src/widgets/styles/qstyleoption.cpp
src/widgets/styles/qstyleoption.h
src/widgets/styles/qwindowscestyle.cpp
src/widgets/styles/qwindowscestyle.h
src/widgets/styles/qwindowsmobilestyle.cpp
src/widgets/styles/qwindowsmobilestyle.h
src/widgets/styles/qwindowsvistastyle.cpp
src/widgets/styles/qwindowsvistastyle.h
src/widgets/widgets/qcheckbox.cpp
src/widgets/widgets/qcheckbox.h
src/widgets/widgets/qcommandlinkbutton.cpp
src/widgets/widgets/qcommandlinkbutton.h
src/widgets/widgets/qdatetimeedit.cpp
src/widgets/widgets/qdatetimeedit.h
src/widgets/widgets/qprogressbar.cpp
src/widgets/widgets/qprogressbar.h
src/widgets/widgets/qradiobutton.cpp
src/widgets/widgets/qradiobutton.h
src/widgets/widgets/qspinbox.cpp
src/widgets/widgets/qspinbox.h
src/widgets/widgets/qsplitter.cpp
src/widgets/widgets/qsplitter.h