Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmlcompletionsupport.cpp File Reference
#include "qqmlcompletionsupport_p.h"
#include "qqmllsutils_p.h"
#include <QtLanguageServer/private/qlanguageserverspectypes_p.h>
#include <QtCore/qthreadpool.h>
#include <QtCore/private/qduplicatetracker_p.h>
#include <QtCore/QRegularExpression>
#include <QtQmlDom/private/qqmldomexternalitems_p.h>
#include <QtQmlDom/private/qqmldomtop_p.h>
+ Include dependency graph for qqmlcompletionsupport.cpp:

Go to the source code of this file.

Classes

struct  CompletionContextStrings
 

Enumerations

enum class  TypeCompletionsType { None , Types , TypesAndAttributes }
 
enum class  FunctionCompletion { None , Declaration }
 
enum class  ImportCompletionType { None , Module , Version }
 

Functions

static QList< CompletionItem > importCompletions (DomItem &file, const CompletionContextStrings &ctx)
 
static QList< CompletionItem > idsCompletions (DomItem component)
 
static QList< CompletionItem > bindingsCompletions (DomItem &containingObject)
 
static QList< CompletionItem > reachableSymbols (DomItem &context, const CompletionContextStrings &ctx, TypeCompletionsType typeCompletionType, FunctionCompletion completeMethodCalls)
 

Enumeration Type Documentation

◆ FunctionCompletion

enum class FunctionCompletion
strong
Enumerator
None 
Declaration 

Definition at line 164 of file qqmlcompletionsupport.cpp.

◆ ImportCompletionType

enum class ImportCompletionType
strong
Enumerator
None 
Module 
Version 

Definition at line 166 of file qqmlcompletionsupport.cpp.

◆ TypeCompletionsType

enum class TypeCompletionsType
strong
Enumerator
None 
Types 
TypesAndAttributes 

Definition at line 162 of file qqmlcompletionsupport.cpp.

Function Documentation

◆ bindingsCompletions()

static QList< CompletionItem > bindingsCompletions ( DomItem containingObject)
static

Definition at line 274 of file qqmlcompletionsupport.cpp.

References it, methods, qCDebug, and signal.

Referenced by CompletionRequest::completions().

+ Here is the caller graph for this function:

◆ idsCompletions()

static QList< CompletionItem > idsCompletions ( DomItem  component)
static

Definition at line 261 of file qqmlcompletionsupport.cpp.

References component(), and qCDebug.

Referenced by CompletionRequest::completions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importCompletions()

static QList< CompletionItem > importCompletions ( DomItem file,
const CompletionContextStrings ctx 
)
static

Definition at line 174 of file qqmlcompletionsupport.cpp.

References QList< T >::at(), base, file, QList< T >::first(), QDuplicateTracker< T, Prealloc >::hasSeen(), QList< T >::isEmpty(), QList< T >::last(), Module, None, QString::number(), QString::size(), QList< T >::size(), Qt::SkipEmptyParts, split(), QString::toUtf8(), and Version.

Referenced by CompletionRequest::completions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reachableSymbols()

static QList< CompletionItem > reachableSymbols ( DomItem context,
const CompletionContextStrings ctx,
TypeCompletionsType  typeCompletionType,
FunctionCompletion  completeMethodCalls 
)
static

Definition at line 313 of file qqmlcompletionsupport.cpp.

References QString::arg(), QMap< Key, T >::constBegin(), QMap< Key, T >::constEnd(), context, Declaration, QQmlJS::Dom::defaultErrorHandler(), el, QSet< T >::isEmpty(), QList< T >::isEmpty(), it, QQmlJS::Dom::Paths::lookupSymbolPath(), methods, None, Q_ASSERT, qCDebug, Qt::SkipEmptyParts, QString::trimmed(), Types, and TypesAndAttributes.

Referenced by CompletionRequest::completions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: