Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmllsutils_p.h File Reference

(1cd950dbbb0a0df0b1b8a7bf401326795f1e6952)

#include <QtLanguageServer/private/qlanguageserverspectypes_p.h>
#include <QtQmlDom/private/qqmldomexternalitems_p.h>
#include <QtQmlDom/private/qqmldomtop_p.h>
#include <algorithm>
#include <optional>
#include <tuple>
#include <variant>
Include dependency graph for qqmllsutils_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QQmlLSUtils::ItemLocation
struct  QQmlLSUtils::TextPosition
struct  QQmlLSUtils::ErrorMessage
struct  QQmlLSUtils::ExpressionType
class  QQmlLSUtils::Location
struct  QQmlLSUtils::FileRename
 Represents a rename operation where the file itself needs to be renamed. More...
struct  QQmlLSUtils::Edit
class  QQmlLSUtils::Usages
 Represents the locations where some highlighting should take place, like in the "find all references" feature of the LSP. More...
class  QQmlLSUtils::RenameUsages
 Represents the locations where a renaming should take place. More...

Namespaces

namespace  QQmlLSUtils

Typedefs

using QQmlLSUtils::DomItem = QQmlJS::Dom::DomItem

Enumerations

enum  QQmlLSUtils::IdentifierType : quint8 {
  QQmlLSUtils::NotAnIdentifier , QQmlLSUtils::JavaScriptIdentifier , QQmlLSUtils::PropertyIdentifier , QQmlLSUtils::PropertyChangedSignalIdentifier ,
  QQmlLSUtils::PropertyChangedHandlerIdentifier , QQmlLSUtils::SignalIdentifier , QQmlLSUtils::SignalHandlerIdentifier , QQmlLSUtils::MethodIdentifier ,
  QQmlLSUtils::LambdaMethodIdentifier , QQmlLSUtils::QmlObjectIdIdentifier , QQmlLSUtils::SingletonIdentifier , QQmlLSUtils::EnumeratorIdentifier ,
  QQmlLSUtils::EnumeratorValueIdentifier , QQmlLSUtils::AttachedTypeIdentifier , QQmlLSUtils::AttachedTypeIdentifierInBindingTarget , QQmlLSUtils::GroupedPropertyIdentifier ,
  QQmlLSUtils::QmlComponentIdentifier , QQmlLSUtils::QualifiedModuleIdentifier
}
enum  QQmlLSUtils::ResolveOptions { QQmlLSUtils::ResolveOwnerType , QQmlLSUtils::ResolveActualTypeForFieldMemberExpression }

Functions

QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY (QQmlLSUtilsLog)
qsizetype QQmlLSUtils::textOffsetFrom (const QString &text, int row, int column)
 Convert a text position from (line, column) into an offset.
TextPosition QQmlLSUtils::textRowAndColumnFrom (const QString &text, qsizetype offset)
 Convert a text position from an offset into (line, column).
QList< ItemLocationQQmlLSUtils::itemsFromTextLocation (const DomItem &file, int line, int character)
 Find the DomItem representing the object situated in file at given line and character/column.
DomItem QQmlLSUtils::sourceLocationToDomItem (const DomItem &file, const QQmlJS::SourceLocation &location)
QByteArray QQmlLSUtils::lspUriToQmlUrl (const QByteArray &uri)
QByteArray QQmlLSUtils::qmlUrlToLspUri (const QByteArray &url)
QLspSpecification::Range QQmlLSUtils::qmlLocationToLspLocation (Location qmlLocation)
 Converts a QQmlJS::SourceLocation to a LSP Range.
DomItem QQmlLSUtils::baseObject (const DomItem &qmlObject)
std::optional< LocationQQmlLSUtils::findTypeDefinitionOf (const DomItem &object)
 Returns the location of the type definition pointed by object.
std::optional< LocationQQmlLSUtils::findDefinitionOf (const DomItem &item, const QStringList &headerDirectories)
Usages QQmlLSUtils::findUsagesOf (const DomItem &item)
std::optional< ErrorMessageQQmlLSUtils::checkNameForRename (const DomItem &item, const QString &newName, const std::optional< ExpressionType > &targetType=std::nullopt)
RenameUsages QQmlLSUtils::renameUsagesOf (const DomItem &item, const QString &dirtyNewName, const std::optional< ExpressionType > &targetType)
 Rename the appearance of item to newName.
std::optional< ExpressionTypeQQmlLSUtils::resolveExpressionType (const QQmlJS::Dom::DomItem &item, ResolveOptions options)
 Resolves the type of the given DomItem, when possible (e.g., when there are enough type annotations).
bool QQmlLSUtils::isValidEcmaScriptIdentifier (QStringView view)
std::pair< QString, QStringListQQmlLSUtils::cmakeBuildCommand (const QString &path)
bool QQmlLSUtils::isFieldMemberExpression (const DomItem &item)
bool QQmlLSUtils::isFieldMemberAccess (const DomItem &item)
bool QQmlLSUtils::isFieldMemberBase (const DomItem &item)
QStringList QQmlLSUtils::fieldMemberExpressionBits (const DomItem &item, const DomItem &stopAtChild={})
QString QQmlLSUtils::qualifiersFrom (const DomItem &el)
QQmlJSScope::ConstPtr QQmlLSUtils::findDefiningScopeForProperty (const QQmlJSScope::ConstPtr &referrerScope, const QString &nameToCheck)
 Finds the scope where a property is first defined.
QQmlJSScope::ConstPtr QQmlLSUtils::findDefiningScopeForBinding (const QQmlJSScope::ConstPtr &referrerScope, const QString &nameToCheck)
QQmlJSScope::ConstPtr QQmlLSUtils::findDefiningScopeForMethod (const QQmlJSScope::ConstPtr &referrerScope, const QString &nameToCheck)
QQmlJSScope::ConstPtr QQmlLSUtils::findDefiningScopeForEnumeration (const QQmlJSScope::ConstPtr &referrerScope, const QString &nameToCheck)
QQmlJSScope::ConstPtr QQmlLSUtils::findDefiningScopeForEnumerationKey (const QQmlJSScope::ConstPtr &referrerScope, const QString &nameToCheck)
QStringList QQmlLSUtils::findFilePathsFromFileNames (const QString &rootDir, const QStringList &fileNamesToSearch, const QSet< QString > &ignoredPaths)
QString QQmlLSUtils::findFilePathFromFileName (const QStringList &rootDirs, const QString &fileNameToSearch, const QSet< QString > &ignoredPaths)

Function Documentation

◆ Q_DECLARE_LOGGING_CATEGORY()

QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY ( QQmlLSUtilsLog )