diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-25 14:48:25 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-25 08:42:23 +0200 |
commit | 54318131a568dafcb0d84d89d2fcb2472c9e97f9 (patch) | |
tree | f90b4c5157fde771efd7f781bf9b8e58b40d4b21 /tests/auto/widgets/graphicsview | |
parent | c7dd882b7a9b1f78e2aa8b482a54d33dce9497fe (diff) |
Remove QSKIPs from qgraphicsgridlayout 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: Id4cf7e8dc48f836d2c6dcde57dde87797a2fe036
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/widgets/graphicsview')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 5d9d4afcb6..26b8616231 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -1053,13 +1053,13 @@ void tst_QGraphicsGridLayout::horizontalSpacing() layout->setContentsMargins(0, 0, 0, 0); qreal w = layout->sizeHint(Qt::PreferredSize, QSizeF()).width(); qreal oldSpacing = layout->horizontalSpacing(); + + // The remainder of this test is only applicable if the current style uses uniform layout spacing if (oldSpacing != -1) { layout->setHorizontalSpacing(horizontalSpacing); QApplication::processEvents(); qreal new_w = layout->sizeHint(Qt::PreferredSize, QSizeF()).width(); QCOMPARE(new_w, w - (3-1)*(oldSpacing - horizontalSpacing)); - } else { - QSKIP("The current style uses non-uniform layout spacing"); } delete widget; } @@ -1638,14 +1638,14 @@ void tst_QGraphicsGridLayout::setSpacing() QSizeF sh = layout->sizeHint(Qt::PreferredSize, QSizeF()); qreal oldVSpacing = layout->verticalSpacing(); qreal oldHSpacing = layout->horizontalSpacing(); + + // The remainder of this test is only applicable if the current style uses uniform layout spacing if (oldVSpacing != -1) { layout->setSpacing(spacing); QApplication::processEvents(); QSizeF newSH = layout->sizeHint(Qt::PreferredSize, QSizeF()); QCOMPARE(newSH.height(), sh.height() - (2-1)*(oldVSpacing - spacing)); QCOMPARE(newSH.width(), sh.width() - (3-1)*(oldHSpacing - spacing)); - } else { - QSKIP("The current style uses non-uniform layout spacing"); } delete widget; } @@ -1753,13 +1753,13 @@ void tst_QGraphicsGridLayout::verticalSpacing() layout->setContentsMargins(0, 0, 0, 0); qreal h = layout->sizeHint(Qt::PreferredSize, QSizeF()).height(); qreal oldSpacing = layout->verticalSpacing(); + + // The remainder of this test is only applicable if the current style uses uniform layout spacing if (oldSpacing != -1) { layout->setVerticalSpacing(verticalSpacing); QApplication::processEvents(); qreal new_h = layout->sizeHint(Qt::PreferredSize, QSizeF()).height(); QCOMPARE(new_h, h - (2-1)*(oldSpacing - verticalSpacing)); - } else { - QSKIP("The current style uses non-uniform layout spacing"); } delete widget; } |