summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprojectmanager/qmlproject.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2012-12-03 15:28:34 +0100
committerKai Koehne <kai.koehne@digia.com>2012-12-03 16:36:09 +0100
commitf0d5ad714e7487b16e6c068d15f108a5d983afaf (patch)
tree8215d37e6f73415a80e895aa6e6fc75ae01c7d6b /src/plugins/qmlprojectmanager/qmlproject.cpp
parentd80c227636fbf897d40a27b114555f55e4f2dbbf (diff)
downloadqt-creator-f0d5ad714e7487b16e6c068d15f108a5d983afaf.tar.gz
QmlProject: Don't add Qt import on command line
Actually this can lead to crashes if passing the QtQuick1 import path to qmlscene. The removed code was introduced in 404186a919b5655054. However, the Qt import path for the code model is also added in QmlProject::refresh(). Task-number: QTCREATORBUG-8365 Change-Id: I8581ce3d67c83c0f27d7b8aefedf9765935bedbc Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlproject.cpp')
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index abd4f2e5a4..a598d5d93a 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<QmlProjectRunConfiguration*>(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;
}