Skip to content
Snippets Groups Projects
Commit 924a45dc authored by Christian Stenger's avatar Christian Stenger
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -45,10 +45,6 @@ def main():
startApplication("qtcreator" + SettingsPath)
if not startedWithoutPluginError():
return
overrideInstallLazySignalHandler()
# used simplified object to omit the visible property - causes Squish problem here otherwise
installLazySignalHandler("{type='CppEditor::Internal::CPPEditorWidget'}", "textChanged()",
"__handleTextChanged__")
openQmakeProject(proFile)
progressBarWait(20000)
selectFromLocator("dummy.cpp")
......@@ -114,17 +110,11 @@ def main():
test.compare(lineUnderCursor(findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")), "Dummy::Dummy(int)")
invokeMenuItem("File", "Exit")
def __handleTextChanged__(*args):
global textChanged
textChanged = True
def __typeAndWaitForAction__(editor, keyCombination):
global textChanged
textChanged = False
origTxt = str(editor.plainText)
cursorPos = editor.textCursor().position()
type(editor, keyCombination)
waitFor("textChanged or cppEditorPositionChanged(cursorPos)", 2000)
if not (textChanged or cppEditorPositionChanged(cursorPos)):
if not waitFor("cppEditorPositionChanged(cursorPos) or origTxt != str(editor.plainText)", 2000):
test.warning("Waiting timed out...")
def cppEditorPositionChanged(origPos):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment