summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-09-10 11:25:41 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-09-10 12:00:19 (GMT)
commit8a43ccdaf3bbd1e77045cbb63231e201ea23896f (patch)
tree4f86a89fa736f4ff370403d93f731f99e70092c9 /tests
parent0472a8d312f2040f42ee817d05dd6e765260de88 (diff)
downloadQt-8a43ccdaf3bbd1e77045cbb63231e201ea23896f.zip
Qt-8a43ccdaf3bbd1e77045cbb63231e201ea23896f.tar.gz
Qt-8a43ccdaf3bbd1e77045cbb63231e201ea23896f.tar.bz2
Fix a regression where setPreferredSize(QSize(100, -1)) did not work.
Regressed by change 515991426832a6333f2fd9e639bd4c83e2b27cef Reviewed-by: Frederik Gladhorn
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp b/tests/auto/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
index 879e12b..dbffa6e 100644
--- a/tests/auto/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
+++ b/tests/auto/qgraphicslayoutitem/tst_qgraphicslayoutitem.cpp
@@ -75,6 +75,7 @@ private slots:
void setPreferredSize_data();
void setPreferredSize();
void setSizePolicy_data();
+ void setPreferredSize2();
void setSizePolicy();
};
@@ -343,6 +344,13 @@ void tst_QGraphicsLayoutItem::setPreferredSize()
}
}
+void tst_QGraphicsLayoutItem::setPreferredSize2()
+{
+ SubQGraphicsLayoutItem layoutItem;
+ layoutItem.setPreferredSize(QSizeF(30, -1));
+ QCOMPARE(layoutItem.preferredWidth(), qreal(30));
+}
+
void tst_QGraphicsLayoutItem::setSizePolicy_data()
{
QTest::addColumn<QSizePolicy>("policy");