diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-31 14:16:01 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-31 14:54:01 (GMT) |
commit | c57ed134a536c177d1774d9272ca187bdfb28e6b (patch) | |
tree | 9b93dcca114411550913184feb1c1ae3b3dfddbb /tests/auto/qformlayout | |
parent | c6cdfcb02d74f726e79ead9f890f294587a7c63c (diff) | |
download | Qt-c57ed134a536c177d1774d9272ca187bdfb28e6b.zip Qt-c57ed134a536c177d1774d9272ca187bdfb28e6b.tar.gz Qt-c57ed134a536c177d1774d9272ca187bdfb28e6b.tar.bz2 |
Revert "Fix QFormLayout which allowed fields to be smaller that their minimum size"
This reverts commit 244f5ee9c2c34ddee200e4d5cdc1345762a5901b.
Valgrind complains about the label fields that are not inisialized yet,
and indeed. They are initialized right after, and need the maxLabelWidth
to be computed. This is a chicken and egg problem difficult to solve, so
I rather revert the change as the bug is not critical
Diffstat (limited to 'tests/auto/qformlayout')
-rw-r--r-- | tests/auto/qformlayout/tst_qformlayout.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/auto/qformlayout/tst_qformlayout.cpp b/tests/auto/qformlayout/tst_qformlayout.cpp index 74384a9..9806557 100644 --- a/tests/auto/qformlayout/tst_qformlayout.cpp +++ b/tests/auto/qformlayout/tst_qformlayout.cpp @@ -125,7 +125,6 @@ private slots: Qt::Orientations expandingDirections() const; */ - void fieldMinimumSize(); }; tst_QFormLayout::tst_QFormLayout() @@ -906,35 +905,6 @@ void tst_QFormLayout::layoutAlone() QTest::qWait(500); } - -void tst_QFormLayout::fieldMinimumSize() -{ - //check that the field with is bigger than its minimumSizeHint for any size of the widget - // even if the label with is not fixed - QWidget w; - QFormLayout layout; - layout.setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - w.setLayout(&layout); - QLabel label1("Here is a strange test case"); - label1.setWordWrap(true); - QLabel label2("Here is another label"); - label2.setWordWrap(true); - QLabel shortLabel("short"); - QLabel longLabel("Quite long label"); - layout.addRow(&label1, &shortLabel); - layout.addRow(&label2, &longLabel); - w.show(); - int width = w.size().width() + 9; - - do { - w.resize(width, w.size().height()); - layout.activate(); - QVERIFY(shortLabel.size().width() >= shortLabel.minimumSizeHint().width()); - QVERIFY(longLabel.size().width() >= longLabel.minimumSizeHint().width()); - width -= 3; - } while(width >= w.minimumSizeHint().width()); -} - QTEST_MAIN(tst_QFormLayout) #include "tst_qformlayout.moc" |