diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2013-12-17 14:33:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-02 21:41:55 +0100 |
commit | b72880d213b6ec94dcd9e388a6e648cc9b636194 (patch) | |
tree | 9c6dcee8c7d0f06430fe495a22779745b178a952 /src/gui/util/qgridlayoutengine_p.h | |
parent | 718c5eafa051c6e2a5e271034a116c0a42b1589a (diff) |
Also cache totalBoxes if we have HFW/WFH
Change-Id: Iea71c11b88df84b9c0949b1020a6bcc5395d62de
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/gui/util/qgridlayoutengine_p.h')
-rw-r--r-- | src/gui/util/qgridlayoutengine_p.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/util/qgridlayoutengine_p.h b/src/gui/util/qgridlayoutengine_p.h index 9650e7fffe..bbc94bd51f 100644 --- a/src/gui/util/qgridlayoutengine_p.h +++ b/src/gui/util/qgridlayoutengine_p.h @@ -450,15 +450,21 @@ private: mutable int q_cachedEffectiveLastRows[NOrientations]; mutable quint8 q_cachedConstraintOrientation : 3; + // this is useful to cache + mutable QGridLayoutBox q_totalBoxes[NOrientations]; + enum { + NotCached = -2, // Cache is empty. Happens when the engine is invalidated. + CachedWithNoConstraint = -1 // cache has a totalBox without any HFW/WFH constraints. + // >= 0 // cache has a totalBox with this specific constraint. + }; + mutable qreal q_totalBoxCachedConstraints[NOrientations]; // holds the constraint used for the cached totalBox + // Layout item input mutable QGridLayoutRowData q_columnData; mutable QGridLayoutRowData q_rowData; - mutable QGridLayoutBox q_totalBoxes[NOrientations]; // Output mutable QSizeF q_cachedSize; - mutable bool q_totalBoxesValid; - mutable bool q_sizeHintValid[NOrientations]; mutable QVector<qreal> q_xx; mutable QVector<qreal> q_yy; mutable QVector<qreal> q_widths; |