summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qmdiarea_p.h
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2009-05-07 08:09:14 (GMT)
committerjasplin <qt-info@nokia.com>2009-05-07 08:11:45 (GMT)
commit515991426832a6333f2fd9e639bd4c83e2b27cef (patch)
treece4896d65b77cc355631945e336e71ac8d37db7a /src/gui/widgets/qmdiarea_p.h
parent73b519015e16d0cd265a1955419e409ba74ce3e4 (diff)
downloadQt-515991426832a6333f2fd9e639bd4c83e2b27cef.zip
Qt-515991426832a6333f2fd9e639bd4c83e2b27cef.tar.gz
Qt-515991426832a6333f2fd9e639bd4c83e2b27cef.tar.bz2
Reduced memory footprint of QGraphicsWidget.
This commit reduces the memory footprint of QGraphicsWidget by around 40% (from around 663 bytes to around 409 bytes - measured using /proc/<pid>/statm on Linux - see 'man 5 proc'). The technique used is to lazily allocate (on the heap) certain data structures (i.e. not allocate them unless they are needed): - QGraphicsLayoutItemPrivate::userSizeHints => used only if the size, width, or height is explicitly set - QGraphicsWidgetPrivate::margins => used only if the contents margins are accessed - QGraphicsWidgetPrivate::windowFrameMargins => used only if the window frame margins are accessed - QGraphicsWidgetPrivate::windowData => used only if the graphics widget is a window In addition, a few unused data members (and related code) were removed: - QGraphicsWidgetPrivate::contentsRect - QGraphicsWidgetPrivate::mouseDelta - QGraphicsWidgetPrivate::*LayoutItemMargin Reviewed-by: andreas Task-number: 251592
Diffstat (limited to 'src/gui/widgets/qmdiarea_p.h')
0 files changed, 0 insertions, 0 deletions