diff --git a/tests/system/objects.map b/tests/system/objects.map index cfbffacf8fd..f6ef8dbb4f8 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -107,6 +107,7 @@ :JavaScript.QmlProfilerEventsTable_QmlProfiler::Internal::QV8ProfilerEventsMainView {container=':*Qt Creator.JavaScript_QDockWidget' name='QmlProfilerEventsTable' type='QmlProfiler::Internal::QV8ProfilerEventsMainView' visible='1'} :Kits_QtVersion_QComboBox {container=':qt_tabwidget_stackedwidget_QWidget' occurrence='5' type='QComboBox' unnamed='1' visible='1'} :Locals and Expressions_Debugger::Internal::WatchTreeView {container=':DebugModeWidget.Locals and Expressions_QDockWidget' name='WatchWindow' type='Debugger::Internal::WatchTreeView' visible='1' windowTitle='Locals and Expressions'} +:Minimal required Qt version:_QLabel {text='Minimal required Qt version:' type='QLabel' unnamed='1' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'} :New Text File.Add to project:_QLabel {name='projectLabel' text='Add to project:' type='QLabel' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'} :New Text File.nameLineEdit_Utils::FileNameValidatingLineEdit {name='nameLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'} :New Text File_ProjectExplorer::JsonWizard {type='ProjectExplorer::JsonWizard' unnamed='1' visible='1'} diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index d7328a3781f..2c45f220f50 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -131,21 +131,16 @@ def __createProjectSetNameAndPath__(path, projectName = None, checks = True, lib clickButton(waitForObject(":Next_QPushButton")) return str(projectName) -def __createProjectHandleQtQuickSelection__(qtQuickOrControlsVersion): - comboBox = waitForObject("{type='QComboBox' unnamed='1' visible='1' " - "leftWidget={text='Qt Quick component set:' type='QLabel' unnamed='1' " - "visible='1'}}") +def __createProjectHandleQtQuickSelection__(minimumQtVersion): + comboBox = waitForObject("{buddy=':Minimal required Qt version:_QLabel' name='QtVersion' " + "type='Utils::TextFieldComboBox' visible='1'}") try: - selectFromCombo(comboBox, "Qt Quick %s" % qtQuickOrControlsVersion) + selectFromCombo(comboBox, "Qt %s" % minimumQtVersion) except: t,v = sys.exc_info()[:2] - test.fatal("Exception while trying to select Qt Quick version", "%s (%s)" % (str(t), str(v))) - label = waitForObject("{type='QLabel' unnamed='1' visible='1' text?='Creates a *' }") - requires = re.match(".*Requires Qt (\d\.\d).*", str(label.text)) - if requires: - requires = requires.group(1) + test.fatal("Exception while trying to select Qt version", "%s (%s)" % (str(t), str(v))) clickButton(waitForObject(":Next_QPushButton")) - return requires + return minimumQtVersion # Selects the Qt versions for a project # param checks turns tests in the function on if set to True @@ -274,11 +269,11 @@ def createProject_Qt_Console(path, projectName, checks = True): return checkedTargets def createNewQtQuickApplication(workingDir, projectName = None, - targets=Targets.desktopTargetClasses(), qtQuickVersion="1.1", + targets=Targets.desktopTargetClasses(), minimumQtVersion="5.3", fromWelcome=False): available = __createProjectOrFileSelectType__(" Application", "Qt Quick Application", fromWelcome) projectName = __createProjectSetNameAndPath__(workingDir, projectName) - requiredQt = __createProjectHandleQtQuickSelection__(qtQuickVersion) + requiredQt = __createProjectHandleQtQuickSelection__(minimumQtVersion) __modifyAvailableTargets__(available, requiredQt) checkedTargets = __chooseTargets__(targets, available) snooze(1) diff --git a/tests/system/suite_SCOM/tst_SCOM04/test.py b/tests/system/suite_SCOM/tst_SCOM04/test.py index 712350430c8..3bd54c46386 100644 --- a/tests/system/suite_SCOM/tst_SCOM04/test.py +++ b/tests/system/suite_SCOM/tst_SCOM04/test.py @@ -44,7 +44,7 @@ def main(): checkedTargets, projectName = createNewQtQuickApplication(tempDir(), "SampleApp") # create syntax error in cpp file openDocument("SampleApp.Sources.main\\.cpp") - if not appendToLine(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget"), "viewer.showExpanded();", "SyntaxError"): + if not appendToLine(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget"), "QQmlApplicationEngine engine;", "SyntaxError"): invokeMenuItem("File", "Exit") return # save all