2011-08-25 10:05:28 +02:00
|
|
|
|
|
|
|
|
def invokeMenuItem(menu, item):
|
|
|
|
|
menuObject = waitForObjectItem("{type='QMenuBar' visible='true'}", menu)
|
|
|
|
|
activateItem(menuObject)
|
|
|
|
|
activateItem(waitForObjectItem(menuObject, item))
|
|
|
|
|
|
2011-08-31 13:51:32 +02:00
|
|
|
def openQmakeProject(projectPath):
|
2011-08-25 10:05:28 +02:00
|
|
|
invokeMenuItem("File", "Open File or Project...")
|
|
|
|
|
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}")
|
|
|
|
|
type(findObject("{name='fileNameEdit' type='QLineEdit'}"), projectPath)
|
|
|
|
|
clickButton(findObject("{text='Open' type='QPushButton'}"))
|
|
|
|
|
waitForObject("{type='Qt4ProjectManager::Internal::ProjectLoadWizard' visible='1' windowTitle='Project Setup'}")
|
2011-09-02 12:19:54 +02:00
|
|
|
selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox", "For Each Qt Version One Debug And One Release")
|
2011-08-25 10:05:28 +02:00
|
|
|
clickButton(findObject("{text='Finish' type='QPushButton'}"))
|
2011-08-31 13:51:32 +02:00
|
|
|
|
|
|
|
|
def openCmakeProject(projectPath):
|
|
|
|
|
invokeMenuItem("File", "Open File or Project...")
|
|
|
|
|
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}")
|
|
|
|
|
type(findObject("{name='fileNameEdit' type='QLineEdit'}"), projectPath)
|
|
|
|
|
clickButton(findObject("{text='Open' type='QPushButton'}"))
|
|
|
|
|
clickButton(waitForObject(":CMake Wizard.Next_QPushButton", 20000))
|
|
|
|
|
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton", 20000))
|
|
|
|
|
clickButton(waitForObject(":CMake Wizard.Finish_QPushButton", 60000))
|
2011-09-06 09:12:15 +02:00
|
|
|
|
|
|
|
|
def logApplicationOutput():
|
|
|
|
|
# make sure application output is shown
|
|
|
|
|
toggleAppOutput = waitForObject("{type='Core::Internal::OutputPaneToggleButton' unnamed='1' visible='1' "
|
|
|
|
|
"window=':Qt Creator_Core::Internal::MainWindow' occurrence='3'}", 20000)
|
|
|
|
|
if not toggleAppOutput.checked:
|
|
|
|
|
clickButton(toggleAppOutput)
|
|
|
|
|
output = waitForObject("{type='Core::OutputWindow' visible='1' windowTitle='Application Output Window'}", 20000)
|
|
|
|
|
test.log("Application Output:\n%s" % output.plainText)
|
|
|
|
|
|