forked from qt-creator/qt-creator
qmljs: improve handling of qml dialects
Language::Enum -> QmlDialect * class instead of enum * moved Language specific operations to it (from Document) * nicer handling QStringList -> PathsAndLanguages * store language along with path, to perform a correct scan and improve path handling Change-Id: If69d35c63cfeb48aa670b51870916cd0c40f1916 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -610,7 +610,9 @@ void QmakeProject::updateQmlJSCodeModel()
|
||||
|
||||
bool hasQmlLib = false;
|
||||
foreach (QmakeProFileNode *node, proFiles) {
|
||||
projectInfo.importPaths.append(node->variableValue(QmlImportPathVar));
|
||||
foreach (const QString &path, node->variableValue(QmlImportPathVar))
|
||||
projectInfo.importPaths.maybeInsert(Utils::FileName::fromString(path),
|
||||
QmlJS::Dialect::Qml);
|
||||
projectInfo.activeResourceFiles.append(node->variableValue(ExactResourceVar));
|
||||
projectInfo.allResourceFiles.append(node->variableValue(ResourceVar));
|
||||
if (!hasQmlLib) {
|
||||
@@ -630,7 +632,6 @@ void QmakeProject::updateQmlJSCodeModel()
|
||||
pl.add(ProjectExplorer::Constants::LANG_QMLJS);
|
||||
setProjectLanguages(pl);
|
||||
|
||||
projectInfo.importPaths.removeDuplicates();
|
||||
projectInfo.activeResourceFiles.removeDuplicates();
|
||||
projectInfo.allResourceFiles.removeDuplicates();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user