MCPcopy Create free account
hub / github.com/KDE/kdevelop / importModule

Method importModule

plugins/qmljs/duchain/declarationbuilder.cpp:1047–1067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1045}
1046
1047void DeclarationBuilder::importModule(QmlJS::AST::UiImport* node)
1048{
1049 QmlJS::AST::UiQualifiedId *part = node->importUri;
1050 QString uri;
1051
1052 while (part) {
1053 if (!uri.isEmpty()) {
1054 uri.append(QLatin1Char('.'));
1055 }
1056
1057 uri.append(part->name.toString());
1058 part = part->next;
1059 }
1060
1061 // Version of the import
1062 QString version = m_session->symbolAt(node->versionToken);
1063
1064 // Import the directory containing the module
1065 QString modulePath = QmlJS::Cache::instance().modulePath(m_session->url(), uri, version);
1066 importDirectory(modulePath, node);
1067}
1068
1069bool DeclarationBuilder::visit(QmlJS::AST::UiImport* node)
1070{

Callers

nothing calls this directly

Calls 6

symbolAtMethod · 0.80
isEmptyMethod · 0.45
appendMethod · 0.45
toStringMethod · 0.45
modulePathMethod · 0.45
urlMethod · 0.45

Tested by

no test coverage detected