diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-03-30 09:19:15 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-03-30 09:22:57 (GMT) |
commit | cfe17692dc6c65b2979dbd648d2eebff78a83200 (patch) | |
tree | 687e799a11694c7c996c14b59964a9b65762e08e /tests/auto/qwidget | |
parent | 9748269cb58266fdfdac2c8820dad8c473dcf512 (diff) | |
download | Qt-cfe17692dc6c65b2979dbd648d2eebff78a83200.zip Qt-cfe17692dc6c65b2979dbd648d2eebff78a83200.tar.gz Qt-cfe17692dc6c65b2979dbd648d2eebff78a83200.tar.bz2 |
Provide a previousInFocusChain for consistancy
Task-number: 201649
Reviewed-by: Thierry
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index dfd0792..9197144 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -1544,6 +1544,10 @@ void tst_QWidget::focusChainOnReparent() QCOMPARE(w, expectedOriginalChain[i]); w = w->nextInFocusChain(); } + for (int i = 7; i >= 0; --i) { + w = w->previousInFocusChain(); + QCOMPARE(w, expectedOriginalChain[i]); + } QWidget window2; child2->setParent(&window2); @@ -1554,6 +1558,10 @@ void tst_QWidget::focusChainOnReparent() QCOMPARE(w, expectedNewChain[i]); w = w->nextInFocusChain(); } + for (int i = 4; i >= 0; --i) { + w = w->previousInFocusChain(); + QCOMPARE(w, expectedNewChain[i]); + } QWidget *expectedOldChain[5] = {&window, child1, child3, child4, &window}; w = &window; @@ -1561,6 +1569,10 @@ void tst_QWidget::focusChainOnReparent() QCOMPARE(w, expectedOldChain[i]); w = w->nextInFocusChain(); } + for (int i = 4; i >= 0; --i) { + w = w->previousInFocusChain(); + QCOMPARE(w, expectedOldChain[i]); + } } |