36 QList<QLspSpecification::Location> results;
37 ResponseScopeGuard guard(results, request->m_response);
39 auto itemsFound = itemsForRequest(request);
40 if (guard.setErrorFrom(itemsFound))
43 auto &front = std::get<QList<QQmlLSUtils::ItemLocation>>(itemsFound).front();
45 auto base = QQmlLSUtils::findTypeDefinitionOf(front.domItem);
48 qDebug() << u"Could not obtain the base from the item"_s;
52 QLspSpecification::Location l;
53 l.uri = QUrl::fromLocalFile(base->filename()).toEncoded();
54 l.range = QQmlLSUtils::qmlLocationToLspLocation(*base);