forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user