2016-01-15 14:55:33 +01:00
|
|
|
# Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2013-05-15 13:17:33 +02:00
|
|
|
|
2011-09-06 09:12:15 +02:00
|
|
|
source("../../shared/qtcreator.py")
|
|
|
|
|
|
|
|
|
|
def main():
|
2018-08-22 14:37:34 +02:00
|
|
|
startQC()
|
2013-02-22 14:31:39 +01:00
|
|
|
if not startedWithoutPluginError():
|
|
|
|
|
return
|
2015-06-24 12:27:01 +02:00
|
|
|
|
2023-02-16 08:43:14 +01:00
|
|
|
available = [("6.2", "Qt Quick Application", Targets.DESKTOP_6_2_4),
|
2021-12-08 11:32:23 +01:00
|
|
|
]
|
2015-06-24 12:27:01 +02:00
|
|
|
|
2019-04-24 18:42:25 +02:00
|
|
|
for qtVersion, appTemplate, targ in available:
|
2013-08-26 11:31:37 +02:00
|
|
|
# using a temporary directory won't mess up a potentially existing
|
|
|
|
|
workingDir = tempDir()
|
2018-08-10 08:16:19 +02:00
|
|
|
checkedTargets = createNewQtQuickApplication(workingDir, targets=[targ],
|
2018-08-02 11:26:43 +02:00
|
|
|
minimumQtVersion=qtVersion,
|
2019-04-24 18:42:25 +02:00
|
|
|
template=appTemplate)[0]
|
2015-06-24 12:27:01 +02:00
|
|
|
if len(checkedTargets) == 0:
|
2019-04-24 18:42:25 +02:00
|
|
|
test.fatal("Could not check wanted target")
|
2015-06-24 12:27:01 +02:00
|
|
|
continue
|
2019-04-24 18:42:25 +02:00
|
|
|
test.log("Building project %s (%s)"
|
|
|
|
|
% (appTemplate, Targets.getStringForTarget(targ)))
|
2020-01-27 14:48:58 +01:00
|
|
|
invokeMenuItem("Build", "Build All Projects")
|
2014-01-21 17:29:35 +01:00
|
|
|
waitForCompile()
|
2013-08-26 11:31:37 +02:00
|
|
|
if not checkCompile():
|
|
|
|
|
test.fatal("Compile failed")
|
|
|
|
|
else:
|
|
|
|
|
checkLastBuild()
|
|
|
|
|
test.log("Running project (includes build)")
|
2018-04-10 22:10:33 +02:00
|
|
|
if runAndCloseApp() == None:
|
2014-01-23 16:29:05 +01:00
|
|
|
checkCompile()
|
|
|
|
|
else:
|
2015-07-09 16:43:14 +02:00
|
|
|
appOutput = logApplicationOutput()
|
2023-02-22 15:19:56 +01:00
|
|
|
test.verify(not ("Main.qml" in appOutput or "MainForm.ui.qml" in appOutput),
|
2015-07-09 16:43:14 +02:00
|
|
|
"Does the Application Output indicate QML errors?")
|
2013-08-26 11:31:37 +02:00
|
|
|
invokeMenuItem("File", "Close All Projects and Editors")
|
2011-11-09 16:40:35 +01:00
|
|
|
|
2011-09-06 09:12:15 +02:00
|
|
|
invokeMenuItem("File", "Exit")
|