diff options
author | Dominik Holland <dominik.holland@nokia.com> | 2010-08-05 11:16:44 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2010-11-02 14:30:39 (GMT) |
commit | 193e4fccf1f472a2ff9f6d914d4a27d1e39e568f (patch) | |
tree | bbae900f5c29fec4a3a36974212271dcbc4c2a58 | |
parent | 01956f9244bf6da45745a836333a9baf134c4075 (diff) | |
download | Qt-193e4fccf1f472a2ff9f6d914d4a27d1e39e568f.zip Qt-193e4fccf1f472a2ff9f6d914d4a27d1e39e568f.tar.gz Qt-193e4fccf1f472a2ff9f6d914d4a27d1e39e568f.tar.bz2 |
Fixed QAccessability autotest to use a dummy toplevel widget
-rw-r--r-- | tests/auto/qaccessibility/tst_qaccessibility.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index cea259c..21a530e 100644 --- a/tests/auto/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp @@ -2269,6 +2269,7 @@ void tst_QAccessibility::scrollBarTest() delete scrollBarInterface; delete scrollBar; + // Test that the rects are ok. { QScrollBar *scrollBar = new QScrollBar(Qt::Horizontal); @@ -2289,7 +2290,6 @@ void tst_QAccessibility::scrollBarTest() const QRect scrollBarRect = scrollBarInterface->rect(0); QVERIFY(scrollBarRect.isValid()); - // Verify that the sub-control rects are valid and inside the scrollBar rect. for (int i = LineUp; i <= LineDown; ++i) { const QRect testRect = scrollBarInterface->rect(i); @@ -3469,14 +3469,15 @@ void tst_QAccessibility::tableWidgetTest() { #ifdef QTEST_ACCESSIBILITY { - QTableWidget *w = new QTableWidget(8,4); + QWidget *topLevel = new QWidget; + QTableWidget *w = new QTableWidget(8,4,topLevel); for (int r = 0; r < 8; ++r) { for (int c = 0; c < 4; ++c) { w->setItem(r, c, new QTableWidgetItem(tr("%1,%2").arg(c).arg(r))); } } w->resize(100, 100); - w->show(); + topLevel->show(); #if defined(Q_WS_X11) qt_x11_wait_for_window_manager(w); QTest::qWait(100); @@ -3503,6 +3504,7 @@ void tst_QAccessibility::tableWidgetTest() delete view; delete client; delete w; + delete topLevel; } QTestAccessibility::clearEvents(); #else |