Ubuntu Pastebin

Paste from Albert Astals Cid at Thu, 8 Jan 2015 11:54:01 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index 5366748..5fc01b8 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml                                                                                                                                                                                                                                          
@@ -1056,6 +1056,10 @@ Item {                                                                                                                                                                                                                                                   
             modifiers = Qt.NoModifier                                                                                                                                                                                                                                          
         if (delay == undefined)                                                                                                                                                                                                                                                
             delay = -1                                                                                                                                                                                                                                                         
+        if (!item)                                                                                                                                                                                                                                                             
+            fail("No item to click")                                                                                                                                                                                                                                           
+        if (!item.visible)                                                                                                                                                                                                                                                     
+            fail("item to click is not visible")                                                                                                                                                                                                                               
         if (!qtest_events.mouseClick(item, x, y, button, modifiers, delay))                                                                                                                                                                                                    
             qtest_fail("window not shown", 2)                                                                                                                                                                                                                                  
     }                                                                                                                                                                                                                                                                          
Download as text