diff options
Diffstat (limited to 'tests/auto/widgets/kernel')
-rw-r--r-- | tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp | 20 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/BLACKLIST | 29 |
2 files changed, 21 insertions, 28 deletions
diff --git a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp index 2f1a305710..3dfb9c35b3 100644 --- a/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp +++ b/tests/auto/widgets/kernel/qboxlayout/tst_qboxlayout.cpp @@ -56,6 +56,7 @@ private slots: void taskQTBUG_40609_addingWidgetToItsOwnLayout(); void taskQTBUG_40609_addingLayoutToItself(); void replaceWidget(); + void indexOf(); }; class CustomLayoutStyle : public QProxyStyle @@ -514,5 +515,24 @@ void tst_QBoxLayout::replaceWidget() QCOMPARE(boxLayout->indexOf(replaceTo), 1); } +void tst_QBoxLayout::indexOf() +{ + QWidget w; + auto outer = new QVBoxLayout(&w); + auto inner = new QHBoxLayout(); + outer->addLayout(inner); + auto widget1 = new QWidget(); + QWidget widget2; + inner->addWidget(widget1); + + QCOMPARE(inner->indexOf(widget1), 0); + QCOMPARE(inner->indexOf(&widget2), -1); + QCOMPARE(outer->indexOf(widget1), -1); + QCOMPARE(outer->indexOf(&widget2), -1); + QCOMPARE(outer->indexOf(outer), -1); + QCOMPARE(outer->indexOf(inner), 0); + QCOMPARE(inner->indexOf(inner->itemAt(0)), 0); +} + QTEST_MAIN(tst_QBoxLayout) #include "tst_qboxlayout.moc" diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 02cdd1a895..dc9adb74f7 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -15,20 +15,12 @@ rhel-7.4 osx [focusProxyAndInputMethods] linux -[showMaximized] -osx -[setGeometry] -osx -[raise] -osx -[resizeEvent] -osx [setWindowGeometry] osx [windowMoveResize] osx [childEvents] -osx +osx ci [renderInvisible] osx [optimizedResizeMove] @@ -40,27 +32,8 @@ osx [showMinimizedKeepsFocus] osx-10.11 ci osx-10.12 ci -[moveWindowInShowEvent:1] -osx -[moveWindowInShowEvent:2] -osx -[taskQTBUG_4055_sendSyntheticEnterLeave] -osx -[syntheticEnterLeave] -osx [maskedUpdate] -osx opensuse-42.3 -[hideOpaqueChildWhileHidden] -osx -[resizeStaticContentsChildWidget_QTBUG35282] -osx -[lower] -osx -[setClearAndResizeMask] -osx -[setToolTip] -osx [moveInResizeEvent] ubuntu-16.04 [moveChild:right] |