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
QmlLsp Namespace Reference

Classes

class  AbstractReader
class  FileReader
struct  LastLintUpdate
struct  ModuleSetting
class  OpenDocument
class  OpenDocumentSnapshot
class  QmlLintSuggestions
class  QProcessScheduler
 Runs multiple processes sequentially via a QProcess, and signals once they are done. More...
class  QQmlCodeModel
class  QQmlCodeModelManager
class  QQmlLanguageServer
 Sets up a QmlLanguageServer. More...
class  QQmllsBuildInformation
struct  QQmlWorkspace
struct  RegisteredSemanticTokens
class  StdinReader

Typedefs

using ModuleSettings = QList<ModuleSetting>
using AdvanceFunc = qxp::function_ref<void(const QQmlJS::SourceLocation &, Position &)>

Enumerations

enum  VersionCheckResult {
  ClosedDocument , VersionLowerThanDocument , VersionLowerThanSnapshot , VersionOk ,
  ClosedDocument , VersionLowerThanDocument , VersionLowerThanSnapshot , VersionOk
}
enum  VersionCheckResultForValidDocument { VersionLowerThanValidSnapshot , VersionOkForValidDocument , VersionLowerThanValidSnapshot , VersionOkForValidDocument }
enum  UpdatePolicy { NormalUpdate , ForceUpdate }
enum  VersionCheckResult {
  ClosedDocument , VersionLowerThanDocument , VersionLowerThanSnapshot , VersionOk ,
  ClosedDocument , VersionLowerThanDocument , VersionLowerThanSnapshot , VersionOk
}
enum  VersionCheckResultForValidDocument { VersionLowerThanValidSnapshot , VersionOkForValidDocument , VersionLowerThanValidSnapshot , VersionOkForValidDocument }

Functions

static QStringList collectImportPaths (const QCommandLineParser &parser, const QCommandLineOption &qmlImportPathOption, const QCommandLineOption &environmentOption, const QCommandLineOption &qmlImportNoDefault)
int qmllsMain (int argv, char *argc[])
VersionCheckResult checkVersion (const OpenDocument &doc, int version)
static VersionCheckResultForValidDocument checkVersionForValidDocument (const OpenDocument &doc, int version)
static void updateItemInSnapshot (const DomItem &item, const DomItem &validItem, const QByteArray &url, OpenDocument *doc, int version, UpdatePolicy policy)
static QStringList withDependentBuildDirectories (QStringList &&buildPaths)
static DiagnosticSeverity severityFromMsgType (QtMsgType t)
static void codeActionHandler (const QByteArray &, const CodeActionParams &params, LSPPartialResponse< std::variant< QList< std::variant< Command, CodeAction > >, std::nullptr_t >, QList< std::variant< Command, CodeAction > > > &&response)
static void advancePositionPastLocation_helper (const QString &fileContents, const QQmlJS::SourceLocation &location, Position &position)
static Diagnostic createMissingBuildDirDiagnostic ()
static Diagnostic messageToDiagnostic_helper (AdvanceFunc advancePositionPastLocation, std::optional< int > version, const Message &message)
static bool isSnapshotNew (std::optional< int > snapshotVersion, std::optional< int > processedVersion, QmlLsp::UpdatePolicy policy)

Variables

QFilelogFile = nullptr
QBasicMutexlogFileLock = nullptr

Typedef Documentation

◆ AdvanceFunc

Definition at line 156 of file qqmllintsuggestions.cpp.

◆ ModuleSettings

Definition at line 82 of file qqmlcodemodel_p.h.

Enumeration Type Documentation

◆ UpdatePolicy

Enumerator
NormalUpdate 
ForceUpdate 

Definition at line 97 of file qqmlcodemodel_p.h.

◆ VersionCheckResult [1/2]

Enumerator
ClosedDocument 
VersionLowerThanDocument 
VersionLowerThanSnapshot 
VersionOk 
ClosedDocument 
VersionLowerThanDocument 
VersionLowerThanSnapshot 
VersionOk 

Definition at line 452 of file qqmlcodemodel.cpp.

◆ VersionCheckResult [2/2]

Enumerator
ClosedDocument 
VersionLowerThanDocument 
VersionLowerThanSnapshot 
VersionOk 
ClosedDocument 
VersionLowerThanDocument 
VersionLowerThanSnapshot 
VersionOk 

Definition at line 452 of file qqmlcodemodel.cpp.

◆ VersionCheckResultForValidDocument [1/2]

Enumerator
VersionLowerThanValidSnapshot 
VersionOkForValidDocument 
VersionLowerThanValidSnapshot 
VersionOkForValidDocument 

Definition at line 459 of file qqmlcodemodel.cpp.

◆ VersionCheckResultForValidDocument [2/2]

Enumerator
VersionLowerThanValidSnapshot 
VersionOkForValidDocument 
VersionLowerThanValidSnapshot 
VersionOkForValidDocument 

Definition at line 459 of file qqmlcodemodel.cpp.

Function Documentation

◆ advancePositionPastLocation_helper()

void QmlLsp::advancePositionPastLocation_helper ( const QString & fileContents,
const QQmlJS::SourceLocation & location,
Position & position )
static

Definition at line 117 of file qqmllintsuggestions.cpp.

◆ checkVersion()

VersionCheckResult QmlLsp::checkVersion ( const OpenDocument & doc,
int version )

Definition at line 464 of file qqmlcodemodel.cpp.

References ClosedDocument, VersionLowerThanDocument, VersionLowerThanSnapshot, and VersionOk.

Referenced by updateItemInSnapshot().

Here is the caller graph for this function:

◆ checkVersionForValidDocument()

VersionCheckResultForValidDocument QmlLsp::checkVersionForValidDocument ( const OpenDocument & doc,
int version )
static

Definition at line 481 of file qqmlcodemodel.cpp.

References VersionLowerThanValidSnapshot, and VersionOkForValidDocument.

Referenced by updateItemInSnapshot().

Here is the caller graph for this function:

◆ codeActionHandler()

void QmlLsp::codeActionHandler ( const QByteArray & ,
const CodeActionParams & params,
LSPPartialResponse< std::variant< QList< std::variant< Command, CodeAction > >, std::nullptr_t >, QList< std::variant< Command, CodeAction > > > && response )
static

Definition at line 47 of file qqmllintsuggestions.cpp.

◆ collectImportPaths()

QStringList QmlLsp::collectImportPaths ( const QCommandLineParser & parser,
const QCommandLineOption & qmlImportPathOption,
const QCommandLineOption & environmentOption,
const QCommandLineOption & qmlImportNoDefault )
static

Definition at line 182 of file qmllsmain.cpp.

◆ createMissingBuildDirDiagnostic()

Diagnostic QmlLsp::createMissingBuildDirDiagnostic ( )
static

Definition at line 137 of file qqmllintsuggestions.cpp.

◆ isSnapshotNew()

bool QmlLsp::isSnapshotNew ( std::optional< int > snapshotVersion,
std::optional< int > processedVersion,
QmlLsp::UpdatePolicy policy )
static

Definition at line 222 of file qqmllintsuggestions.cpp.

References ForceUpdate.

◆ messageToDiagnostic_helper()

Diagnostic QmlLsp::messageToDiagnostic_helper ( AdvanceFunc advancePositionPastLocation,
std::optional< int > version,
const Message & message )
static

Definition at line 157 of file qqmllintsuggestions.cpp.

◆ qmllsMain()

int QmlLsp::qmllsMain ( int argv,
char * argc[] )

Definition at line 247 of file qmllsmain.cpp.

References logFile, and logFileLock.

◆ severityFromMsgType()

DiagnosticSeverity QmlLsp::severityFromMsgType ( QtMsgType t)
static

Definition at line 31 of file qqmllintsuggestions.cpp.

◆ updateItemInSnapshot()

void QmlLsp::updateItemInSnapshot ( const DomItem & item,
const DomItem & validItem,
const QByteArray & url,
OpenDocument * doc,
int version,
UpdatePolicy policy )
static

Definition at line 490 of file qqmlcodemodel.cpp.

References checkVersion(), checkVersionForValidDocument(), ForceUpdate, VersionOk, and VersionOkForValidDocument.

Here is the call graph for this function:

◆ withDependentBuildDirectories()

QStringList QmlLsp::withDependentBuildDirectories ( QStringList && buildPaths)
static

Definition at line 637 of file qqmlcodemodel.cpp.

Variable Documentation

◆ logFile

QFile * QmlLsp::logFile = nullptr

Definition at line 52 of file qmllsmain.cpp.

Referenced by qmllsMain().

◆ logFileLock

QBasicMutex * QmlLsp::logFileLock = nullptr

Definition at line 53 of file qmllsmain.cpp.

Referenced by qmllsMain().