Squish: Remember where breakpoints are

So we don't have to update the test each time
Creator changes the project templates.

Change-Id: I76f96f719895f2f8cadccaf9c91cc85d1735ce13
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Löhning
2021-04-21 20:43:09 +02:00
parent 5bf2bfedb0
commit 8d813b8864
4 changed files with 28 additions and 14 deletions

View File

@@ -62,6 +62,13 @@ def placeCursorToLine(editor, line, isRegex=False):
type(getEditor(), "<End>")
return True
# returns the number of the text line where the cursor is, starting at line 1
# param editor is the editor the cursor is in
def lineNumberWithCursor(editor):
textPos = editor.textCursor().position()
line = str(editor.plainText)[:textPos].count("\n") + 1
return line
# this function returns True if a QMenu is
# popped up above the given editor
# param editor is the editor where the menu should appear