2016-01-15 14:55:33 +01:00
|
|
|
############################################################################
|
|
|
|
|
#
|
|
|
|
|
# Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
# Contact: https://www.qt.io/licensing/
|
|
|
|
|
#
|
|
|
|
|
# This file is part of Qt Creator.
|
|
|
|
|
#
|
|
|
|
|
# Commercial License Usage
|
|
|
|
|
# Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
# accordance with the commercial license agreement provided with the
|
|
|
|
|
# Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
# a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
# and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
# information use the contact form at https://www.qt.io/contact-us.
|
|
|
|
|
#
|
|
|
|
|
# GNU General Public License Usage
|
|
|
|
|
# Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
# General Public License version 3 as published by the Free Software
|
|
|
|
|
# Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
# included in the packaging of this file. Please review the following
|
|
|
|
|
# information to ensure the GNU General Public License requirements will
|
|
|
|
|
# be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
|
|
|
#
|
|
|
|
|
############################################################################
|
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
|
|
|
|
2021-12-08 11:32:23 +01:00
|
|
|
available = [("5.14", "Qt Quick Application", Targets.DESKTOP_5_14_1_DEFAULT),
|
|
|
|
|
]
|
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()
|
|
|
|
|
test.verify(not ("main.qml" in appOutput or "MainForm.ui.qml" in appOutput),
|
|
|
|
|
"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")
|