Commit 7912071b authored by Christian Stenger's avatar Christian Stenger

Squish: Fix tst_qml_indent

Replace waiting for signal textChanged().

Change-Id: I0798f0ef2e1162d2a2b09da98e53dd8fc50e0a7a
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 4836fa01
......@@ -76,21 +76,14 @@ def prepareQmlFile():
editor.plainText = "\n".join([line.lstrip() for line in lines]) + "\n"
return True
def handleTextChanged(*args):
global textHasChanged
textHasChanged = True
def testReIndent():
global originalText,textHasChanged
installLazySignalHandler(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget",
"textChanged()", "handleTextChanged")
textHasChanged = False
global originalText
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
type(editor, "<Ctrl+A>")
test.log("calling re-indent")
starttime = datetime.utcnow()
type(editor, "<Ctrl+I>")
waitFor("textHasChanged==True", 25000)
waitFor("originalText == str(editor.plainText)", 25000)
endtime = datetime.utcnow()
textAfterReIndent = "%s" % editor.plainText
if originalText==textAfterReIndent:
......
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