diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index e20ab08a6b5..c8cdef1c733 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -170,7 +170,7 @@ void QmlProject::refresh(RefreshOptions options) QmlJS::ModelManagerInterface::ProjectInfo pinfo(this); pinfo.sourceFiles = files(); - pinfo.importPaths = importPaths(); + pinfo.importPaths = customImportPaths(); QtSupport::BaseQtVersion *version = 0; if (activeTarget()) { ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit()); @@ -220,26 +220,12 @@ bool QmlProject::validProjectFile() const return !m_projectItem.isNull(); } -QStringList QmlProject::importPaths() const +QStringList QmlProject::customImportPaths() const { QStringList importPaths; if (m_projectItem) importPaths = m_projectItem.data()->importPaths(); - // add the default import path for the target Qt version - if (activeTarget()) { - const QmlProjectRunConfiguration *runConfig = - qobject_cast(activeTarget()->activeRunConfiguration()); - if (runConfig) { - const QtSupport::BaseQtVersion *qtVersion = runConfig->qtVersion(); - if (qtVersion && qtVersion->isValid()) { - const QString qtVersionImportPath = qtVersion->qmakeProperty("QT_INSTALL_IMPORTS"); - if (!qtVersionImportPath.isEmpty()) - importPaths += qtVersionImportPath; - } - } - } - return importPaths; } diff --git a/src/plugins/qmlprojectmanager/qmlproject.h b/src/plugins/qmlprojectmanager/qmlproject.h index 4b642db986f..e064cf5e4b1 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.h +++ b/src/plugins/qmlprojectmanager/qmlproject.h @@ -86,7 +86,7 @@ public: QDir projectDir() const; QStringList files() const; QString mainFile() const; - QStringList importPaths() const; + QStringList customImportPaths() const; bool addFiles(const QStringList &filePaths); diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 6d16731a375..4ffa15fef4b 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -144,7 +144,7 @@ QString QmlProjectRunConfiguration::viewerArguments() const // arguments from .qmlproject file QmlProject *project = static_cast(target()->project()); - foreach (const QString &importPath, project->importPaths()) { + foreach (const QString &importPath, project->customImportPaths()) { Utils::QtcProcess::addArg(&args, "-I"); Utils::QtcProcess::addArg(&args, importPath); } diff --git a/tests/system/shared/hook_utils.py b/tests/system/shared/hook_utils.py index 96509e23ce5..aad61157c6f 100644 --- a/tests/system/shared/hook_utils.py +++ b/tests/system/shared/hook_utils.py @@ -54,8 +54,7 @@ def modifyRunSettingsForHookInto(projectName, port): switchViewTo(ViewConstants.EDIT) return result -def modifyRunSettingsForHookIntoQtQuickUI(projectName, port): - global workingDir +def modifyRunSettingsForHookIntoQtQuickUI(workingDir, projectName, port): switchViewTo(ViewConstants.PROJECTS) switchToBuildOrRunSettingsFor(1, 0, ProjectSettings.RUN, True) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 56a6880d09f..f2980d9b271 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -223,7 +223,7 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N return projectName def createNewQtQuickUI(workingDir): - __createProjectOrFileSelectType__(" Applications", "Qt Quick UI") + __createProjectOrFileSelectType__(" Applications", "Qt Quick 1 UI") if workingDir == None: workingDir = tempDir() projectName = __createProjectSetNameAndPath__(workingDir) @@ -231,7 +231,7 @@ def createNewQtQuickUI(workingDir): return projectName def createNewQmlExtension(workingDir): - available = __createProjectOrFileSelectType__(" Libraries", "Custom QML Extension Plugin") + available = __createProjectOrFileSelectType__(" Libraries", "Qt Quick 1 Extension Plugin") if workingDir == None: workingDir = tempDir() __createProjectSetNameAndPath__(workingDir) diff --git a/tests/system/suite_editors/shared/testdata/files.tsv b/tests/system/suite_editors/shared/testdata/files.tsv index bc9ade18138..cfdf5d87933 100644 --- a/tests/system/suite_editors/shared/testdata/files.tsv +++ b/tests/system/suite_editors/shared/testdata/files.tsv @@ -3,3 +3,6 @@ "creator/qtcreator.pri" "creator/doc/snippets/qml/list-of-transitions.qml" "creator/share/qtcreator/glsl/glsl_120.frag" +"creator/tests/manual/cplusplus-frontend/conf.c++" +"creator/src/plugins/coreplugin/basefilewizard.cpp" +"creator/src/plugins/coreplugin/basefilewizard.h" diff --git a/tests/system/suite_general/tst_create_proj_wizard/test.py b/tests/system/suite_general/tst_create_proj_wizard/test.py index 237171db037..86010337913 100644 --- a/tests/system/suite_general/tst_create_proj_wizard/test.py +++ b/tests/system/suite_general/tst_create_proj_wizard/test.py @@ -34,7 +34,7 @@ def main(): for template in dumpItems(templatesView.model(), templatesView.rootIndex()): template = template.replace(".", "\\.") # skip non-configurable - if "Qt Quick UI" in template or "Plain C" in template: + if "Qt Quick 1 UI" in template or "Plain C" in template: continue availableProjectTypes.append({category:template}) clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}")) diff --git a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py index fc6345ca884..b3a7e8b7ea8 100644 --- a/tests/system/suite_qtquick/tst_qtquick_creation3/test.py +++ b/tests/system/suite_qtquick/tst_qtquick_creation3/test.py @@ -1,13 +1,12 @@ source("../../shared/qtcreator.py") def main(): - global workingDir startApplication("qtcreator" + SettingsPath) # using a temporary directory won't mess up a potentially existing workingDir = tempDir() projectName = createNewQtQuickUI(workingDir) test.log("Running project") - qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(projectName, 11223) + qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(workingDir, projectName, 11223) if qmlViewer!=None: qmlViewerPath = os.path.dirname(qmlViewer) qmlViewer = os.path.basename(qmlViewer)