SquishTests: Make sure that *UnderCursor() return a str

Without this, "line in lineUnderCursor(w)" can be False
although "line == lineUnderCursor(w)" is True.

Change-Id: I7fa6be7d237957706bf1ad93d7303c55b81f24ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Robert Löhning
2024-01-26 20:59:01 +01:00
parent 5ea09e424d
commit b887825661

View File

@@ -110,7 +110,7 @@ def textUnderCursor(window, fromPos, toPos):
cursor.movePosition(toPos, QTextCursor.KeepAnchor) cursor.movePosition(toPos, QTextCursor.KeepAnchor)
returnValue = cursor.selectedText() returnValue = cursor.selectedText()
cursor.setPosition(oldposition) cursor.setPosition(oldposition)
return returnValue return str(returnValue)
def which(program): def which(program):
# Don't use spawn.find_executable because it can't find .bat or # Don't use spawn.find_executable because it can't find .bat or