4#ifndef QLANGUAGESERVERUTILS_P_H
5#define QLANGUAGESERVERUTILS_P_H
18#include <QtLanguageServer/private/qlanguageserverspectypes_p.h>
19#include <QtQmlDom/private/qqmldomexternalitems_p.h>
20#include <QtQmlDom/private/qqmldomtop_p.h>
67 std::optional<QString>
name;
82 return std::make_tuple(
a.filename,
a.sourceLocation.begin(),
a.sourceLocation.end())
83 < std::make_tuple(
b.filename,
b.sourceLocation.begin(),
b.sourceLocation.end());
87 return std::make_tuple(
a.filename,
a.sourceLocation.begin(),
a.sourceLocation.end())
88 == std::make_tuple(
b.filename,
b.sourceLocation.begin(),
b.sourceLocation.end());
102 return std::make_tuple(
a.location,
a.replacement)
103 < std::make_tuple(
b.location,
b.replacement);
107 return std::make_tuple(
a.location,
a.replacement)
108 == std::make_tuple(
b.location,
b.replacement);
140 int line,
int character);
148 static std::optional<QQmlLSUtilsLocation>
155 const std::optional<QQmlLSUtilsExpressionType> &targetType = std::nullopt);
158 const std::optional<QQmlLSUtilsExpressionType> &targetType = std::nullopt);
172 const DomItem &stopAtChild = {});
std::shared_ptr< AttachedInfoT< FileLocations > > Tree
static QList< QQmlLSUtilsLocation > findUsagesOf(const DomItem &item)
static bool isValidEcmaScriptIdentifier(QStringView view)
static QPair< QString, QStringList > cmakeBuildCommand(const QString &path)
static QList< QQmlLSUtilsItemLocation > itemsFromTextLocation(const DomItem &file, int line, int character)
Find the DomItem representing the object situated in file at given line and character/column.
static std::optional< QQmlLSUtilsErrorMessage > checkNameForRename(const DomItem &item, const QString &newName, const std::optional< QQmlLSUtilsExpressionType > &targetType=std::nullopt)
static DomItem baseObject(const DomItem &qmlObject)
static QByteArray lspUriToQmlUrl(const QByteArray &uri)
static DomItem sourceLocationToDomItem(const DomItem &file, const QQmlJS::SourceLocation &location)
static std::optional< QQmlLSUtilsExpressionType > resolveExpressionType(const DomItem &item, QQmlLSUtilsResolveOptions)
static QStringList fieldMemberExpressionBits(const DomItem &item, const DomItem &stopAtChild={})
static QByteArray qmlUrlToLspUri(const QByteArray &url)
static QString qualifiersFrom(const DomItem &el)
static bool isFieldMemberExpression(const DomItem &item)
static bool isFieldMemberAccess(const DomItem &item)
static QLspSpecification::Range qmlLocationToLspLocation(const QString &code, QQmlJS::SourceLocation qmlLocation)
Converts a QQmlJS::SourceLocation to a LSP Range.
static std::optional< QQmlLSUtilsLocation > findTypeDefinitionOf(const DomItem &item)
Returns the location of the type definition pointed by object.
static std::optional< QQmlLSUtilsLocation > findDefinitionOf(const DomItem &item)
static qsizetype textOffsetFrom(const QString &code, int row, int character)
Convert a text position from (line, column) into an offset.
static QList< QQmlLSUtilsEdit > renameUsagesOf(const DomItem &item, const QString &newName, const std::optional< QQmlLSUtilsExpressionType > &targetType=std::nullopt)
Rename the appearance of item to newName.
static QByteArray getDocumentationFromLocation(const DomItem &file, const QQmlLSUtilsTextPosition &position)
static QQmlLSUtilsTextPosition textRowAndColumnFrom(const QString &code, qsizetype offset)
Convert a text position from an offset into (line, column).
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei length
GLenum GLuint GLintptr offset
GLsizei const GLchar *const * path
GLenum GLenum GLsizei void * row
QQmlLSUtilsIdentifierType
@ PropertyChangedSignalIdentifier
@ SignalHandlerIdentifier
@ PropertyChangedHandlerIdentifier
@ GroupedPropertyIdentifier
@ EnumeratorValueIdentifier
QQmlLSUtilsResolveOptions
@ ResolveActualTypeForFieldMemberExpression
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
QUrl url("example.com")
[constructor-url-reference]
QQmlLSUtilsLocation location
static QQmlLSUtilsEdit from(const QString &fileName, const QString &code, quint32 startLine, quint32 startCharacter, quint32 length, const QString &newName)
friend bool operator==(const QQmlLSUtilsEdit &a, const QQmlLSUtilsEdit &b)
friend bool operator<(const QQmlLSUtilsEdit &a, const QQmlLSUtilsEdit &b)
std::optional< QString > name
QQmlLSUtilsIdentifierType type
QQmlJSScope::ConstPtr semanticScope
QQmlJS::Dom::DomItem domItem
QQmlJS::Dom::FileLocations::Tree fileLocation
friend bool operator==(const QQmlLSUtilsLocation &a, const QQmlLSUtilsLocation &b)
QQmlJS::SourceLocation sourceLocation
friend bool operator<(const QQmlLSUtilsLocation &a, const QQmlLSUtilsLocation &b)
static QQmlLSUtilsLocation from(const QString &fileName, const QString &code, quint32 startLine, quint32 startCharacter, quint32 length)