diff options
| author | Frank Reininghaus <[email protected]> | 2011-01-17 19:36:00 +0000 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2011-01-17 19:36:00 +0000 |
| commit | 519c2d435fe17bbaea4e0219ab570473bd567b11 (patch) | |
| tree | 26dab840d4c351fb3279ddb8a4c1e9fb9670c8a2 /src/tests | |
| parent | 75a6e8fb2ae418960769d4870f4b3dbabb20d049 (diff) | |
Improve DolphinTreeViewTest's stability.
When running the test in the background while using the computer for
other things, it may happen that the test's widgets are not focused,
which led to an infinite loop before this commit. I've removed the
checks that caused this loop because the only thing that is important
for the test is that the view loses the keyboard focus at some point
(see bug 220898).
svn path=/trunk/KDE/kdebase/apps/; revision=1215139
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/dolphintreeviewtest.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tests/dolphintreeviewtest.cpp b/src/tests/dolphintreeviewtest.cpp index 18069125a..61922acd7 100644 --- a/src/tests/dolphintreeviewtest.cpp +++ b/src/tests/dolphintreeviewtest.cpp @@ -373,10 +373,9 @@ void DolphinTreeViewTest::bug220898_focusOut() widget.setFocus(); // Wait until the widgets have received the focus events - while (view.viewport()->hasFocus() || !widget.hasFocus()) { + while (view.viewport()->hasFocus()) { QTest::qWait(10); } - QVERIFY(widget.hasFocus()); QVERIFY(!view.viewport()->hasFocus()); // Release the "Down" key @@ -387,11 +386,10 @@ void DolphinTreeViewTest::bug220898_focusOut() view.viewport()->setFocus(); // Wait until the widgets have received the focus events - while (!view.viewport()->hasFocus() || widget.hasFocus()) { + while (widget.hasFocus()) { QTest::qWait(10); } QVERIFY(!widget.hasFocus()); - QVERIFY(view.viewport()->hasFocus()); // Press left mouse button below the last item const int lastRowHeight = view.sizeHintForRow(4); |
