forked from qt-creator/qt-creator
Change-Id: Ia96a4a000cac1dde0f660e5f58141a73c7625a1e Reviewed-by: Christian Stenger <christian.stenger@digia.com>
28 lines
1.0 KiB
Python
28 lines
1.0 KiB
Python
source("../../shared/qtcreator.py")
|
|
source("../../shared/suites_qtta.py")
|
|
|
|
def startQtCreatorWithNewAppAtQMLEditor(projectDir, projectName, line = None):
|
|
startApplication("qtcreator" + SettingsPath)
|
|
# create qt quick application
|
|
createNewQtQuickApplication(projectDir, projectName)
|
|
# open qml file
|
|
qmlFile = projectName + ".QML.qml/" + projectName + ".main\\.qml"
|
|
if not openDocument(qmlFile):
|
|
test.fatal("Could not open %s" % qmlFile)
|
|
invokeMenuItem("File", "Exit")
|
|
return None
|
|
# get editor
|
|
editorArea = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
|
|
# place to line if needed
|
|
if line:
|
|
# place cursor to component
|
|
if not placeCursorToLine(editorArea, line):
|
|
invokeMenuItem("File", "Exit")
|
|
return None
|
|
return editorArea
|
|
|
|
def verifyCurrentLine(editorArea, currentLineExpectedText, verifyMessage):
|
|
currentLineText = str(lineUnderCursor(editorArea)).strip();
|
|
return test.compare(currentLineText, currentLineExpectedText, verifyMessage)
|
|
|