Qt4Project: Push the Qt version's QML import path to the code model.

Task-number: QTCREATORBUG-2639
Reviewed-by: dt
This commit is contained in:
Christian Kamm
2010-10-13 13:05:36 +02:00
parent 404186a919
commit 61504082a9

View File

@@ -587,6 +587,14 @@ void Qt4Project::updateQmlJSCodeModel()
foreach (Qt4ProFileNode *node, proFiles) {
projectInfo.importPaths.append(node->variableValue(QmlImportPathVar));
}
if (activeTarget() && activeTarget()->activeBuildConfiguration()) {
const QtVersion *qtVersion = activeTarget()->activeBuildConfiguration()->qtVersion();
if (qtVersion->isValid()) {
const QString qtVersionImportPath = qtVersion->versionInfo().value("QT_INSTALL_IMPORTS");
if (!qtVersionImportPath.isEmpty())
projectInfo.importPaths += qtVersionImportPath;
}
}
projectInfo.importPaths.removeDuplicates();
if (projectInfo.qmlDumpPath.isNull()) {