[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/apps/dolphin/src/tests
From:       Frank Reininghaus <frank78ac () googlemail ! com>
Date:       2011-01-17 19:36:01
Message-ID: 20110117193601.41548AC8B5 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1215139 by freininghaus:

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).


 M  +2 -4      dolphintreeviewtest.cpp  


--- trunk/KDE/kdebase/apps/dolphin/src/tests/dolphintreeviewtest.cpp #1215138:1215139
@@ -373,10 +373,9 @@
     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 @@
     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);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic