diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2019-11-14 13:03:46 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2019-11-19 13:53:21 +0100 |
commit | 26e876912435bdafbca2b425af43824d7ec5b876 (patch) | |
tree | b7ee83cdd9de18ce5970bab0bb217a972d3d2445 /tests/auto/widgets/kernel/qformlayout | |
parent | 7a6c6da2ebbfef33f7284ce5c96aa0c3acabc6bc (diff) | |
parent | bac999f38ca10147832846f6d7df1e4a051d3760 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
Diffstat (limited to 'tests/auto/widgets/kernel/qformlayout')
-rw-r--r-- | tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp index c6760000f4..45a35fe4f1 100644 --- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp +++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp @@ -99,7 +99,9 @@ class tst_QFormLayout : public QObject private slots: void cleanup(); void rowCount(); +#if QT_CONFIG(shortcut) void buddies(); +#endif void getItemPosition(); void wrapping(); void spacing(); @@ -190,6 +192,8 @@ void tst_QFormLayout::rowCount() //TODO: remove items } +#if QT_CONFIG(shortcut) + void tst_QFormLayout::buddies() { QWidget w; @@ -218,6 +222,8 @@ void tst_QFormLayout::buddies() //TODO: empty label? } +#endif // QT_CONFIG(shortcut) + void tst_QFormLayout::getItemPosition() { QWidget w; @@ -687,17 +693,21 @@ void tst_QFormLayout::insertRow_QString_QWidget() layout->insertRow(-5, "&Name:", fld1); QLabel *label1 = qobject_cast<QLabel *>(layout->itemAt(0, QFormLayout::LabelRole)->widget()); QVERIFY(label1 != 0); +#if QT_CONFIG(shortcut) QCOMPARE(label1->buddy(), fld1); - +#endif layout->insertRow(0, "&Email:", fld2); QLabel *label2 = qobject_cast<QLabel *>(layout->itemAt(0, QFormLayout::LabelRole)->widget()); QVERIFY(label2 != 0); +#if QT_CONFIG(shortcut) QCOMPARE(label2->buddy(), fld2); - +#endif layout->insertRow(5, "&Age:", fld3); QLabel *label3 = qobject_cast<QLabel *>(layout->itemAt(2, QFormLayout::LabelRole)->widget()); QVERIFY(label3 != 0); +#if QT_CONFIG(shortcut) QCOMPARE(label3->buddy(), fld3); +#endif } void tst_QFormLayout::insertRow_QString_QLayout() @@ -711,21 +721,27 @@ void tst_QFormLayout::insertRow_QString_QLayout() layout->insertRow(-5, "&Name:", fld1); QLabel *label1 = qobject_cast<QLabel *>(layout->itemAt(0, QFormLayout::LabelRole)->widget()); QVERIFY(label1 != 0); +#if QT_CONFIG(shortcut) QVERIFY(!label1->buddy()); +#endif QCOMPARE(layout->rowCount(), 1); layout->insertRow(0, "&Email:", fld2); QLabel *label2 = qobject_cast<QLabel *>(layout->itemAt(0, QFormLayout::LabelRole)->widget()); QVERIFY(label2 != 0); +#if QT_CONFIG(shortcut) QVERIFY(!label2->buddy()); +#endif QCOMPARE(layout->rowCount(), 2); layout->insertRow(5, "&Age:", fld3); QLabel *label3 = qobject_cast<QLabel *>(layout->itemAt(2, QFormLayout::LabelRole)->widget()); QVERIFY(label3 != 0); +#if QT_CONFIG(shortcut) QVERIFY(!label3->buddy()); +#endif QCOMPARE(layout->rowCount(), 3); } |