Commit 924a45dc authored by Christian Stenger's avatar Christian Stenger

Squish: Fix tst_basic_cpp_support

Replace waiting for signal textChanged().

Change-Id: I40feb7d49310d4aa9fae4ca4256e9ce2d0f2ab4d
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent 20a2f388
...@@ -45,10 +45,6 @@ def main(): ...@@ -45,10 +45,6 @@ def main():
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
overrideInstallLazySignalHandler()
# used simplified object to omit the visible property - causes Squish problem here otherwise
installLazySignalHandler("{type='CppEditor::Internal::CPPEditorWidget'}", "textChanged()",
"__handleTextChanged__")
openQmakeProject(proFile) openQmakeProject(proFile)
progressBarWait(20000) progressBarWait(20000)
selectFromLocator("dummy.cpp") selectFromLocator("dummy.cpp")
...@@ -114,17 +110,11 @@ def main(): ...@@ -114,17 +110,11 @@ def main():
test.compare(lineUnderCursor(findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")), "Dummy::Dummy(int)") test.compare(lineUnderCursor(findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")), "Dummy::Dummy(int)")
invokeMenuItem("File", "Exit") invokeMenuItem("File", "Exit")
def __handleTextChanged__(*args):
global textChanged
textChanged = True
def __typeAndWaitForAction__(editor, keyCombination): def __typeAndWaitForAction__(editor, keyCombination):
global textChanged origTxt = str(editor.plainText)
textChanged = False
cursorPos = editor.textCursor().position() cursorPos = editor.textCursor().position()
type(editor, keyCombination) type(editor, keyCombination)
waitFor("textChanged or cppEditorPositionChanged(cursorPos)", 2000) if not waitFor("cppEditorPositionChanged(cursorPos) or origTxt != str(editor.plainText)", 2000):
if not (textChanged or cppEditorPositionChanged(cursorPos)):
test.warning("Waiting timed out...") test.warning("Waiting timed out...")
def cppEditorPositionChanged(origPos): def cppEditorPositionChanged(origPos):
......
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