Commit b63135c0 authored by Christian Stenger's avatar Christian Stenger
Browse files

Squish: Fix possible access to None



Change-Id: I4c4a0f211169dad48a4a6b78e4c298b986d07158
Reviewed-by: default avatarRobert Löhning <robert.loehning@nokia.com>
parent 3872597d
...@@ -64,9 +64,13 @@ def setBreakpointsForCurrentProject(filesAndLines): ...@@ -64,9 +64,13 @@ def setBreakpointsForCurrentProject(filesAndLines):
return False return False
invokeMenuItem("Debug", "Toggle Breakpoint") invokeMenuItem("Debug", "Toggle Breakpoint")
test.log('Set breakpoint in %s' % fName, curLine) test.log('Set breakpoint in %s' % fName, curLine)
breakPointTreeView = waitForObject("{type='Debugger::Internal::BreakWindow' visible='1' " try:
"windowTitle='Breakpoints' name='Debugger.Docks.Break'}") breakPointTreeView = waitForObject("{type='Debugger::Internal::BreakWindow' visible='1' "
waitFor("breakPointTreeView.model().rowCount() == len(filesAndLines)", 2000) "windowTitle='Breakpoints' name='Debugger.Docks.Break'}")
waitFor("breakPointTreeView.model().rowCount() == len(filesAndLines)", 2000)
except:
test.fatal("UI seems to have changed - check manually and fix this script.")
return False
test.compare(breakPointTreeView.model().rowCount(), len(filesAndLines), test.compare(breakPointTreeView.model().rowCount(), len(filesAndLines),
'Expected %d set break points, found %d listed' % 'Expected %d set break points, found %d listed' %
(len(filesAndLines), breakPointTreeView.model().rowCount())) (len(filesAndLines), breakPointTreeView.model().rowCount()))
...@@ -89,8 +93,9 @@ def removeOldBreakpoints(): ...@@ -89,8 +93,9 @@ def removeOldBreakpoints():
rect = breakPointTreeView.visualRect(currentIndex) rect = breakPointTreeView.visualRect(currentIndex)
mouseClick(breakPointTreeView, rect.x+5, rect.y+5, 0, Qt.LeftButton) mouseClick(breakPointTreeView, rect.x+5, rect.y+5, 0, Qt.LeftButton)
type(breakPointTreeView, "<Delete>") type(breakPointTreeView, "<Delete>")
except LookupError: except:
pass test.fatal("UI seems to have changed - check manually and fix this script.")
return False
return test.compare(model.rowCount(), 0, "Check if all breakpoints have been removed.") return test.compare(model.rowCount(), 0, "Check if all breakpoints have been removed.")
# function to do simple debugging of the current (configured) project # function to do simple debugging of the current (configured) project
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment