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

Namespaces

namespace  AST
namespace  Dom
namespace  LoggingUtils

Classes

class  SourceLocation
class  Lexer
class  Directives
class  Engine
class  Export
struct  ExportedScope
struct  ImportedScope
struct  AotStatsEntry
class  AotStats
class  QQmlJSAotCompilerStats
class  AotStatsReporter
struct  HeuristicContextProperty
class  HeuristicContextProperties
class  Import
class  LinterVisitor
class  LoggerCategory
class  LoggerCategoryPrivate
struct  ContextualTypes
class  UserContextProperties
struct  DiagnosticMessage
class  FixedPoolArray
class  MemoryPool
class  Managed

Typedefs

using ChildScopesIterator = QList<QDeferredSharedPointer<QQmlJSScope>>::const_iterator
using LoggerWarningId = QQmlSA::LoggerWarningId
using WarningSeverity = QQmlSA::WarningSeverity

Enumerations

enum class  CodegenResult : quint8 { Success , Skip , Failure }
enum  OverrideInformation {
  WithoutOverride = 0 , WithFinal = 1 , WithOverride = 2 , WithoutOverride = 0 ,
  WithFinal = 1 , WithOverride = 2
}
enum  MethodOrProperty { Method , Property , Method , Property }
enum  OverrideInformation {
  WithoutOverride = 0 , WithFinal = 1 , WithOverride = 2 , WithoutOverride = 0 ,
  WithFinal = 1 , WithOverride = 2
}
enum  MethodOrProperty { Method , Property , Method , Property }

Functions

static constexpr SourceLocation s_documentOrigin (0, 0, 1, 1)
QDebug operator<< (QDebug dbg, const Lexer &l)
QDebug operator<< (QDebug dbg, const Lexer::State &s)
static int classify2 (QStringView s, int parseModeFlags)
static int classify3 (QStringView s, int parseModeFlags)
static int classify4 (QStringView s, int parseModeFlags)
static int classify5 (QStringView s, int parseModeFlags)
static int classify6 (QStringView s, int parseModeFlags)
static int classify7 (QStringView s, int parseModeFlags)
static int classify8 (QStringView s, int parseModeFlags)
static int classify9 (QStringView s, int parseModeFlags)
static int classify10 (QStringView s, int parseModeFlags)
static int classify12 (QStringView s, int parseModeFlags)
static void warnAboutLiteralConstructors (NewMemberExpression *expression, QQmlJSLogger *logger)
static SourceLocation confusingPluses (BinaryExpression *exp)
static SourceLocation confusingMinuses (BinaryExpression *exp)
static bool allCodePathsReturnInsideCase (Node *statement)
static bool isUselessExpressionStatement (ExpressionNode *ast)
static bool canHaveUselessExpressionStatement (Node *parent)
 Q_DECLARE_FLAGS (OverrideInformations, OverrideInformation)
static void warnForMethodShadowingInBase (const QQmlJSScope::ConstPtr &base, const QString &name, const QQmlJS::SourceLocation &location, QQmlJSLogger *logger)
static void warnForPropertyShadowingInBase (const QQmlJSScope::ConstPtr &base, const QString &name, const QQmlJS::SourceLocation &location, OverrideInformations overrideFlags, QQmlJSLogger *logger)
static void warnForDuplicates (const QQmlJSScope::ConstPtr &scope, const QString &name, QLatin1String type, const QQmlJS::SourceLocation &location, OverrideInformations overrideFlags, QQmlJSLogger *logger)
void warnForShadowsInCurrentScope (const QQmlJSScope::ConstPtr &scopeWithId, const QString &name, const QQmlJSScope::ConstPtr &currentScope, const QQmlJS::SourceLocation &location, MethodOrProperty mode, QQmlJSLogger *logger)

Variables

static constexpr int S_AOTSTATS_FORMAT_REVISION = 1
static constexpr QLatin1StringView S_CODEGEN_RESULT { "codegenResult" }
static constexpr QLatin1StringView S_COLUMN { "column" }
static constexpr QLatin1StringView S_DURATION_MICROSECONDS { "durationMicroseconds" }
static constexpr QLatin1StringView S_ENTRIES { "entries" }
static constexpr QLatin1StringView S_FILE_PATH { "filePath" }
static constexpr QLatin1StringView S_FORMAT_REVISION { "formatRevision" }
static constexpr QLatin1StringView S_FUNCTION_NAME { "functionName" }
static constexpr QLatin1StringView S_LINE { "line" }
static constexpr QLatin1StringView S_MESSAGE { "message" }
static constexpr QLatin1StringView S_MODULES { "modules" }
static constexpr QLatin1StringView S_MODULE_FILES { "moduleFiles" }
static constexpr QLatin1StringView S_MODULE_ID { "moduleId" }
static constexpr QLatin1StringView s_pattern
static constexpr int s_contextPropertyNameIdxInPattern = 4
static constexpr std::array s_fileFilters
static const QRegularExpression s_matchSetContextProperty
static constexpr auto cachedHeuristicListKey = "cachedHeuristicList"_L1
static constexpr QLatin1String s_method = "method"_L1
static constexpr QLatin1String s_signal = "signal"_L1
static constexpr QLatin1String s_property = "property"_L1

Typedef Documentation

◆ ChildScopesIterator

Definition at line 43 of file qqmljsscope_p.h.

◆ LoggerWarningId

◆ WarningSeverity

Enumeration Type Documentation

◆ CodegenResult

enum class QQmlJS::CodegenResult : quint8
strong
Enumerator
Success 
Skip 
Failure 

Definition at line 33 of file qqmljscompilerstats_p.h.

◆ MethodOrProperty [1/2]

Enumerator
Method 
Property 
Method 
Property 

Definition at line 726 of file qqmljslintervisitor.cpp.

◆ MethodOrProperty [2/2]

Enumerator
Method 
Property 
Method 
Property 

Definition at line 726 of file qqmljslintervisitor.cpp.

◆ OverrideInformation [1/2]

Enumerator
WithoutOverride 
WithFinal 
WithOverride 
WithoutOverride 
WithFinal 
WithOverride 

Definition at line 591 of file qqmljslintervisitor.cpp.

◆ OverrideInformation [2/2]

Enumerator
WithoutOverride 
WithFinal 
WithOverride 
WithoutOverride 
WithFinal 
WithOverride 

Definition at line 591 of file qqmljslintervisitor.cpp.

Function Documentation

◆ allCodePathsReturnInsideCase()

bool QQmlJS::allCodePathsReturnInsideCase ( Node * statement)
static

Definition at line 304 of file qqmljslintervisitor.cpp.

◆ canHaveUselessExpressionStatement()

bool QQmlJS::canHaveUselessExpressionStatement ( Node * parent)
static

Definition at line 475 of file qqmljslintervisitor.cpp.

◆ classify10()

int QQmlJS::classify10 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 753 of file qqmljskeywords_p.h.

◆ classify12()

int QQmlJS::classify12 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 797 of file qqmljskeywords_p.h.

◆ classify2()

int QQmlJS::classify2 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 25 of file qqmljskeywords_p.h.

◆ classify3()

int QQmlJS::classify3 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 55 of file qqmljskeywords_p.h.

◆ classify4()

int QQmlJS::classify4 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 109 of file qqmljskeywords_p.h.

◆ classify5()

int QQmlJS::classify5 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 191 of file qqmljskeywords_p.h.

◆ classify6()

int QQmlJS::classify6 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 299 of file qqmljskeywords_p.h.

◆ classify7()

int QQmlJS::classify7 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 451 of file qqmljskeywords_p.h.

◆ classify8()

int QQmlJS::classify8 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 533 of file qqmljskeywords_p.h.

◆ classify9()

int QQmlJS::classify9 ( QStringView s,
int parseModeFlags )
inlinestatic

Definition at line 673 of file qqmljskeywords_p.h.

◆ confusingMinuses()

SourceLocation QQmlJS::confusingMinuses ( BinaryExpression * exp)
static

Definition at line 180 of file qqmljslintervisitor.cpp.

◆ confusingPluses()

SourceLocation QQmlJS::confusingPluses ( BinaryExpression * exp)
static

Definition at line 158 of file qqmljslintervisitor.cpp.

◆ isUselessExpressionStatement()

bool QQmlJS::isUselessExpressionStatement ( ExpressionNode * ast)
static

This assumes that there is no custom coercion enabled via Symbol.toPrimitive or similar.

Definition at line 434 of file qqmljslintervisitor.cpp.

◆ operator<<() [1/2]

QDebug QQmlJS::operator<< ( QDebug dbg,
const Lexer & l )

Definition at line 463 of file qqmljslexer.cpp.

◆ operator<<() [2/2]

QDebug QQmlJS::operator<< ( QDebug dbg,
const Lexer::State & s )

Definition at line 1848 of file qqmljslexer.cpp.

◆ Q_DECLARE_FLAGS()

QQmlJS::Q_DECLARE_FLAGS ( OverrideInformations ,
OverrideInformation  )

◆ s_documentOrigin()

constexpr SourceLocation QQmlJS::s_documentOrigin ( 0 ,
0 ,
1 ,
1  )
inlinestaticconstexpr

◆ warnAboutLiteralConstructors()

void QQmlJS::warnAboutLiteralConstructors ( NewMemberExpression * expression,
QQmlJSLogger * logger )
static

Definition at line 129 of file qqmljslintervisitor.cpp.

Referenced by QQmlJS::LinterVisitor::visit().

Here is the caller graph for this function:

◆ warnForDuplicates()

void QQmlJS::warnForDuplicates ( const QQmlJSScope::ConstPtr & scope,
const QString & name,
QLatin1String type,
const QQmlJS::SourceLocation & location,
OverrideInformations overrideFlags,
QQmlJSLogger * logger )
static

Definition at line 662 of file qqmljslintervisitor.cpp.

References QQmlSA::Signal.

◆ warnForMethodShadowingInBase()

void QQmlJS::warnForMethodShadowingInBase ( const QQmlJSScope::ConstPtr & base,
const QString & name,
const QQmlJS::SourceLocation & location,
QQmlJSLogger * logger )
static

Definition at line 594 of file qqmljslintervisitor.cpp.

References QQmlSA::Signal.

◆ warnForPropertyShadowingInBase()

void QQmlJS::warnForPropertyShadowingInBase ( const QQmlJSScope::ConstPtr & base,
const QString & name,
const QQmlJS::SourceLocation & location,
OverrideInformations overrideFlags,
QQmlJSLogger * logger )
static

Definition at line 611 of file qqmljslintervisitor.cpp.

References WithFinal, and WithOverride.

◆ warnForShadowsInCurrentScope()

void QQmlJS::warnForShadowsInCurrentScope ( const QQmlJSScope::ConstPtr & scopeWithId,
const QString & name,
const QQmlJSScope::ConstPtr & currentScope,
const QQmlJS::SourceLocation & location,
MethodOrProperty mode,
QQmlJSLogger * logger )

Definition at line 727 of file qqmljslintervisitor.cpp.

References Property.

Variable Documentation

◆ cachedHeuristicListKey

constexpr auto QQmlJS::cachedHeuristicListKey = "cachedHeuristicList"_L1
staticconstexpr

Definition at line 194 of file qqmljscontextproperties.cpp.

◆ S_AOTSTATS_FORMAT_REVISION

constexpr int QQmlJS::S_AOTSTATS_FORMAT_REVISION = 1
staticconstexpr

Definition at line 84 of file qqmljscompilerstats.cpp.

◆ S_CODEGEN_RESULT

constexpr QLatin1StringView QQmlJS::S_CODEGEN_RESULT { "codegenResult" }
staticconstexpr

Definition at line 86 of file qqmljscompilerstats.cpp.

◆ S_COLUMN

constexpr QLatin1StringView QQmlJS::S_COLUMN { "column" }
staticconstexpr

Definition at line 87 of file qqmljscompilerstats.cpp.

◆ s_contextPropertyNameIdxInPattern

constexpr int QQmlJS::s_contextPropertyNameIdxInPattern = 4
staticconstexpr

Definition at line 32 of file qqmljscontextproperties.cpp.

◆ S_DURATION_MICROSECONDS

constexpr QLatin1StringView QQmlJS::S_DURATION_MICROSECONDS { "durationMicroseconds" }
staticconstexpr

Definition at line 88 of file qqmljscompilerstats.cpp.

◆ S_ENTRIES

constexpr QLatin1StringView QQmlJS::S_ENTRIES { "entries" }
staticconstexpr

Definition at line 89 of file qqmljscompilerstats.cpp.

◆ S_FILE_PATH

constexpr QLatin1StringView QQmlJS::S_FILE_PATH { "filePath" }
staticconstexpr

Definition at line 90 of file qqmljscompilerstats.cpp.

◆ s_fileFilters

constexpr std::array QQmlJS::s_fileFilters
staticconstexpr
Initial value:
= {
"*.cpp"_L1, "*.cxx"_L1, "*.cc"_L1, "*.c"_L1, "*.c++"_L1,
"*.hpp"_L1, "*.hxx"_L1, "*.hh"_L1, "*.h"_L1, "*.h++"_L1,
}

Definition at line 36 of file qqmljscontextproperties.cpp.

◆ S_FORMAT_REVISION

constexpr QLatin1StringView QQmlJS::S_FORMAT_REVISION { "formatRevision" }
staticconstexpr

Definition at line 91 of file qqmljscompilerstats.cpp.

◆ S_FUNCTION_NAME

constexpr QLatin1StringView QQmlJS::S_FUNCTION_NAME { "functionName" }
staticconstexpr

Definition at line 92 of file qqmljscompilerstats.cpp.

◆ S_LINE

constexpr QLatin1StringView QQmlJS::S_LINE { "line" }
staticconstexpr

Definition at line 93 of file qqmljscompilerstats.cpp.

◆ s_matchSetContextProperty

const QRegularExpression QQmlJS::s_matchSetContextProperty
static
Initial value:

Definition at line 41 of file qqmljscontextproperties.cpp.

◆ S_MESSAGE

constexpr QLatin1StringView QQmlJS::S_MESSAGE { "message" }
staticconstexpr

Definition at line 94 of file qqmljscompilerstats.cpp.

◆ s_method

constexpr QLatin1String QQmlJS::s_method = "method"_L1
staticconstexpr

Definition at line 587 of file qqmljslintervisitor.cpp.

◆ S_MODULE_FILES

constexpr QLatin1StringView QQmlJS::S_MODULE_FILES { "moduleFiles" }
staticconstexpr

Definition at line 96 of file qqmljscompilerstats.cpp.

◆ S_MODULE_ID

constexpr QLatin1StringView QQmlJS::S_MODULE_ID { "moduleId" }
staticconstexpr

Definition at line 97 of file qqmljscompilerstats.cpp.

◆ S_MODULES

constexpr QLatin1StringView QQmlJS::S_MODULES { "modules" }
staticconstexpr

Definition at line 95 of file qqmljscompilerstats.cpp.

◆ s_pattern

constexpr QLatin1StringView QQmlJS::s_pattern
staticconstexpr
Initial value:
=
R"x((\.|->)setContextProperty\s*\‍(\s*(QStringLiteral\s*\‍(|QString\s*\‍(|QLatin1String(View)?\s*\‍(|u)?\s*"([^"]*)")x"_L1

Definition at line 30 of file qqmljscontextproperties.cpp.

◆ s_property

constexpr QLatin1String QQmlJS::s_property = "property"_L1
staticconstexpr

Definition at line 589 of file qqmljslintervisitor.cpp.

◆ s_signal

constexpr QLatin1String QQmlJS::s_signal = "signal"_L1
staticconstexpr

Definition at line 588 of file qqmljslintervisitor.cpp.