summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-02-14 11:33:02 +0100
committerLiang Qi <liang.qi@qt.io>2017-02-14 11:33:02 +0100
commit27432d40f2500b11780398f6c7d67719050dae6c (patch)
tree97f9a60af2d520d66fa7ff802ccddad56e0cadaf /tests/auto/widgets
parent071a120400b17eaa0b414a0ed262b0a090908679 (diff)
parent10ecbc4041cb7db004f4ed4d40ce082553d75844 (diff)
Merge remote-tracking branch 'origin/5.8' into 5.9
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index d8239b5a28..c324a4bd56 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -757,13 +757,14 @@ void tst_QFormLayout::removeRow()
layout->removeRow(1);
- QVERIFY(!w1);
- QCOMPARE(layout->count(), 1);
+ QVERIFY(w1);
+ QVERIFY(!w2);
+ QCOMPARE(layout->count(), 2);
QCOMPARE(layout->rowCount(), 1);
layout->removeRow(0);
- QVERIFY(!w2);
+ QVERIFY(!w1);
QCOMPARE(layout->count(), 0);
QCOMPARE(layout->rowCount(), 0);
}
@@ -863,17 +864,19 @@ void tst_QFormLayout::takeRow()
QVERIFY(w2);
QVERIFY(result.fieldItem);
- QVERIFY(result.labelItem);
- QCOMPARE(layout->count(), 1);
+ QVERIFY(!result.labelItem);
+ QCOMPARE(layout->count(), 2);
QCOMPARE(layout->rowCount(), 1);
+ QCOMPARE(result.fieldItem->widget(), w2.data());
result = layout->takeRow(0);
QVERIFY(w1);
QVERIFY(result.fieldItem);
- QVERIFY(!result.labelItem);
+ QVERIFY(result.labelItem);
QCOMPARE(layout->count(), 0);
QCOMPARE(layout->rowCount(), 0);
+ QCOMPARE(result.fieldItem->widget(), w1.data());
result = layout->takeRow(0);