diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2014-01-21 09:57:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-22 12:19:39 +0100 |
commit | 7ddd813b7f4a7c68047f4296247ddf7f277582b7 (patch) | |
tree | a8aa4230df2becbbf994ccd49f3969efd542848c /src/gui | |
parent | db51ffc0d1fbce85fd542403812fab8783c53e3c (diff) |
Support negative layout spacings (do not assert)
This tests
* default spacing
* explicit positive spacing
* negative spacings
Negative spacings that causes the layout to shrink down to 0 or
a negative spacing are not supported.
(But make sure they don't crash the whole engine)
This is a partial cherry picked from
qtquickcontrols.git/bc973dcf2163b25f2db74d974b252384bbee8d80)
Only the Q_ASSERT had to be cherry-picked. This is because of that the
qgridlayoutengine* is moved to qtbase.
Therefore, any changes to qgridlayoutengine* won't be merged properly to
dev (they will be lost).
Task-number: QTBUG-35741
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Change-Id: I834f1efc11aca59a93c8d870f1a776f2f8810485
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/util/qgridlayoutengine.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/gui/util/qgridlayoutengine.cpp b/src/gui/util/qgridlayoutengine.cpp index be38e92f21..31f00c0601 100644 --- a/src/gui/util/qgridlayoutengine.cpp +++ b/src/gui/util/qgridlayoutengine.cpp @@ -805,7 +805,6 @@ int QGridLayoutEngine::effectiveLastRow(Qt::Orientation orientation) const void QGridLayoutEngine::setSpacing(qreal spacing, Qt::Orientations orientations) { - Q_ASSERT(spacing >= 0.0); if (orientations & Qt::Horizontal) q_defaultSpacings[Hor].setUserValue(spacing); if (orientations & Qt::Vertical) |