From 89e26da4374563c9419da1357a24cf9618d804d6 Mon Sep 17 00:00:00 2001 From: "Eduardo M. Fleury" Date: Thu, 19 Nov 2009 19:35:53 -0300 Subject: QGAL: Remove deprecated assert clauses These assert messages are no longer valid since some anchors can have their size not respected if they are in parallel with the layout and have size equal to "QWIDGETSIZE_MAX". Signed-off-by: Eduardo M. Fleury Reviewed-by: Caio Marcelo de Oliveira Filho --- src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index 2f4ec26..b35ee46 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -478,18 +478,6 @@ static qreal interpolate(const QPair minSize || qAbs(sizeAtMinimum - minSize) < 0.00000001); - Q_ASSERT(sizeAtPreferred > minSize || qAbs(sizeAtPreferred - minSize) < 0.00000001); - Q_ASSERT(sizeAtMaximum > minSize || qAbs(sizeAtMaximum - minSize) < 0.00000001); - - // These may be false if this anchor was in parallel with the layout stucture - // Q_ASSERT(sizeAtMinimum < maxSize || qAbs(sizeAtMinimum - maxSize) < 0.00000001); - // Q_ASSERT(sizeAtPreferred < maxSize || qAbs(sizeAtPreferred - maxSize) < 0.00000001); - // Q_ASSERT(sizeAtMaximum < maxSize || qAbs(sizeAtMaximum - maxSize) < 0.00000001); - // Band here refers if the value is in the Minimum To Preferred // band (the lower band) or the Preferred To Maximum (the upper band). @@ -2844,8 +2832,6 @@ bool QGraphicsAnchorLayoutPrivate::solveMinMax(const QList for (int i = 0; i < variables.size(); ++i) { AnchorData *ad = static_cast(variables.at(i)); ad->sizeAtMinimum = ad->result - limit; - Q_ASSERT(ad->sizeAtMinimum >= ad->minSize || - qAbs(ad->sizeAtMinimum - ad->minSize) < 0.00000001); } // Calculate maximum values @@ -2855,8 +2841,6 @@ bool QGraphicsAnchorLayoutPrivate::solveMinMax(const QList for (int i = 0; i < variables.size(); ++i) { AnchorData *ad = static_cast(variables.at(i)); ad->sizeAtMaximum = ad->result - limit; - // Q_ASSERT(ad->sizeAtMaximum <= ad->maxSize || - // qAbs(ad->sizeAtMaximum - ad->maxSize) < 0.00000001); } } return feasible; -- cgit v0.12