From f6b05d50758ccc5a9aaf5cd37a710f80c9e1d413 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 25 Oct 2011 14:59:27 +1000 Subject: Remove QSKIPs from qgraphicslinearlayout test If the test decides not to do some extra testing for certain styles, but doesn't find any failures in what it has done so far, it should pass rather than skipping. Removing the QSKIPs also corrects the leakage of the memory pointed to by "widget". Change-Id: Ibd0f3f0605660c92e9bab2a3d1d9f31b52192575 Reviewed-by: Rohan McGovern --- .../qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index 9769ff0da4..3c458b0ead 100644 --- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -936,6 +936,7 @@ void tst_QGraphicsLinearLayout::setSpacing() widget->setLayout(&layout); layout.setContentsMargins(0, 0, 0, 0); + // The remainder of this test is only applicable if the style uses uniform spacing qreal oldSpacing = layout.spacing(); if (oldSpacing != -1) { for (int i = 0; i < 3; ++i) @@ -951,8 +952,6 @@ void tst_QGraphicsLinearLayout::setSpacing() QSizeF newSizeHint = layout.sizeHint(Qt::PreferredSize); QCOMPARE(oldSizeHint.width() - oldSpacing * 2, newSizeHint.width() - spacing * 2); - } else { - QSKIP("This style uses non-uniform spacings (layoutSpacingImplementation() is reimplemented)"); } delete widget; } @@ -995,10 +994,10 @@ void tst_QGraphicsLinearLayout::setItemSpacing() view.show(); QApplication::processEvents(); QSizeF newSizeHint = layout->sizeHint(Qt::PreferredSize); + + // The remainder of this test is only applicable if the style uses uniform spacing if (oldSpacing >= 0) { QCOMPARE(newSizeHint.width() - spacing, oldSizeHint.width() - oldSpacing); - } else { - QSKIP("This style uses non-uniform spacings (layoutSpacingImplementation() is reimplemented)"); } delete widget; } -- cgit v1.2.3