void QmlProject::refresh(RefreshOptions options) { parseProject(options); if (options & Files) m_rootNode->refresh(); QmlJS::ModelManagerInterface::ProjectInfo pinfo(this); pinfo.sourceFiles = files(); pinfo.importPaths = importPaths(); QtSupport::BaseQtVersion *version = 0; if (activeTarget()) { if (QmlProjectRunConfiguration *rc = qobject_cast<QmlProjectRunConfiguration *>(activeTarget()->activeRunConfiguration())) version = rc->qtVersion(); QList<ProjectExplorer::ToolChain *> tcList; if (version && !version->qtAbis().isEmpty()) tcList = ProjectExplorer::ToolChainManager::instance()->findToolChains(version->qtAbis().at(0)); if (!tcList.isEmpty()) QtSupport::QmlDumpTool::pathAndEnvironment(this, version, tcList.first(), false, &pinfo.qmlDumpPath, &pinfo.qmlDumpEnvironment); } if (version) { pinfo.tryQmlDump = true; pinfo.qtImportsPath = version->versionInfo().value("QT_INSTALL_IMPORTS"); pinfo.qtVersionString = version->qtVersionString(); } m_modelManager->updateProjectInfo(pinfo); }
void QmlProject::refresh(RefreshOptions options) { parseProject(options); if (options & Files) m_rootNode->refresh(); QmlJS::ModelManagerInterface::ProjectInfo pinfo(this); pinfo.sourceFiles = files(); pinfo.importPaths = importPaths(); QtSupport::BaseQtVersion *version = 0; if (activeTarget()) { if (QmlProjectRunConfiguration *rc = qobject_cast<QmlProjectRunConfiguration *>(activeTarget()->activeRunConfiguration())) version = rc->qtVersion(); QtSupport::QmlDumpTool::pathAndEnvironment(this, version, false, &pinfo.qmlDumpPath, &pinfo.qmlDumpEnvironment); } m_modelManager->updateProjectInfo(pinfo); }