source("../../shared/qtcreator.py") workingDir = None def main(): global workingDir startApplication("qtcreator" + SettingsPath) if not checkDebuggingLibrary("4.7.4", [QtQuickConstants.Targets.DESKTOP]): test.fatal("Error while checking debugging libraries - leaving this test.") invokeMenuItem("File", "Exit") return # using a temporary directory won't mess up a potentially existing workingDir = tempDir() projectName = createNewQtQuickApplication(workingDir, targets = QtQuickConstants.Targets.DESKTOP) # wait for parsing to complete waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)") editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' " "visible='1' window=':Qt Creator_Core::Internal::MainWindow'}") if placeCursorToLine(editor, "MouseArea.*", True): type(editor, '') type(editor, '') typeLines(editor, ['Timer {', 'interval: 1000', 'running: true', 'onTriggered: console.log("Break here")']) invokeMenuItem("File", "Save All") filesAndLines = [ { "%s.QML.qml/%s.main\\.qml" % (projectName,projectName) : 'onTriggered.*' }, { "%s.Sources.main\\.cpp" % projectName : "viewer.setOrientation\\(.+\\);" } ] test.log("Setting breakpoints") result = setBreakpointsForCurrentProject(filesAndLines) if result: expectedBreakpointsOrder = [{"main.cpp":9}, {"main.qml":14}] # Only use 4.7.4 to work around QTBUG-25187 availableConfigs = iterateBuildConfigs(1, 0, ".*4\.7\.4.*$(?