summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2014-01-10 13:46:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-16 16:02:12 +0100
commitbc973dcf2163b25f2db74d974b252384bbee8d80 (patch)
tree42a34b52ee5be529336482ee057f690de0108a46 /src
parent768e190b5d74ddb20135d37e6b17639896e18ee6 (diff)
downloadqtquickcontrols-bc973dcf2163b25f2db74d974b252384bbee8d80.tar.gz
qtquickcontrols-bc973dcf2163b25f2db74d974b252384bbee8d80.tar.bz2
qtquickcontrols-bc973dcf2163b25f2db74d974b252384bbee8d80.zip
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) Task-number: QTBUG-35741 Change-Id: I69521dffb03c35a63db37ab51a2e99152d88272b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/layouts/qgridlayoutengine.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/layouts/qgridlayoutengine.cpp b/src/layouts/qgridlayoutengine.cpp
index 910e34a0..35aa04f1 100644
--- a/src/layouts/qgridlayoutengine.cpp
+++ b/src/layouts/qgridlayoutengine.cpp
@@ -813,7 +813,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)