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 <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-10-25 14:59:27 +10:00 committed by Qt by Nokia
parent 54318131a5
commit f6b05d5075

View File

@ -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;
}