36 QList<QLspSpecification::Location> results;
39 auto itemsFound = itemsForRequest(request);
40 if (!itemsFound.has_value()) {
41 guard.setError(itemsFound.error());
47 auto usages = QQmlLSUtils::findUsagesOf(front.domItem);
49 QQmlJS::Dom::DomItem files = front.domItem.top().field(QQmlJS::Dom::Fields::qmlFileWithPath);
52 for (
const auto &usage : usages.usagesInFile()) {
53 QLspSpecification::Location location;
54 location.uri = QUrl::fromLocalFile(usage.filename()).toEncoded();
55 location.range = QQmlLSUtils::qmlLocationToLspLocation(usage);
57 results.append(location);