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
QQmlSA::GenericPropertyPass Struct Reference

#include <qqmlsa_p.h>

Inheritance diagram for QQmlSA::GenericPropertyPass:
Collaboration diagram for QQmlSA::GenericPropertyPass:

Public Types

using OnBinding = decltype(&onBindingDefault)
using OnRead = decltype(&onReadDefault)
using OnCall = decltype(&onCallDefault)
using OnWrite = decltype(&onWriteDefault)

Public Member Functions

void onBinding (const Element &element, const QString &propertyName, const Binding &binding, const Element &bindingScope, const Element &value) override
 Executes whenever a property gets bound to a value.
void onRead (const Element &element, const QString &propertyName, const Element &readScope, SourceLocation location) override
 Executes whenever a property is read.
void onCall (const Element &element, const QString &propertyName, const Element &readScope, SourceLocation location) override
 Executes whenever a property or method is called.
void onWrite (const Element &element, const QString &propertyName, const Element &value, const Element &writeScope, SourceLocation location) override
 Executes whenever a property is written to.
 PropertyPass (PassManager *manager)
 Creates a PropertyPass object and uses manager to refer to the pass manager.
Public Member Functions inherited from QQmlSA::PropertyPass
 PropertyPass (PassManager *manager)
 Creates a PropertyPass object and uses manager to refer to the pass manager.
Public Member Functions inherited from QQmlSA::GenericPass
 GenericPass (PassManager *manager)
 Creates a generic pass.
virtual ~GenericPass ()
 Destroys the GenericPass instance.
void emitWarning (QAnyStringView diagnostic, LoggerWarningId id)
 Emits a warning message diagnostic about an issue of type id.
void emitWarning (QAnyStringView diagnostic, LoggerWarningId id, QQmlSA::SourceLocation srcLocation)
 Emits warning message diagnostic about an issue of type id located at srcLocation.
void emitWarning (QAnyStringView diagnostic, LoggerWarningId id, QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix)
 Emits a warning message diagnostic about an issue of type id located at srcLocation and with suggested fix fix.
Element resolveTypeInFileScope (QAnyStringView typeName)
 Returns the type corresponding to typeName inside the currently analysed file.
Element resolveAttachedInFileScope (QAnyStringView typeName)
 Returns the attached type corresponding to typeName used inside the currently analysed file.
Element resolveType (QAnyStringView moduleName, QAnyStringView typeName)
 Returns the type of typeName defined in module moduleName.
Element resolveBuiltinType (QAnyStringView typeName) const
 Returns the type of the built-in type identified by typeName.
Element resolveAttached (QAnyStringView moduleName, QAnyStringView typeName)
 Returns the attached type of typeName defined in module moduleName.
Element resolveLiteralType (const Binding &binding)
 Returns the element representing the type of literal in binding.
Element resolveIdToElement (QAnyStringView id, const Element &context)
 Returns the element in context that has id id.
QString resolveElementToId (const Element &element, const Element &context)
 Returns the id of element in a given context.
QString sourceCode (QQmlSA::SourceLocation location)
 Returns the source code located within location.

Static Public Member Functions

static void onBindingDefault (PropertyPass *, const Element &, const QString &, const Binding &, const Element &, const Element &)
static void onReadDefault (PropertyPass *, const Element &, const QString &, const Element &, SourceLocation)
static void onCallDefault (PropertyPass *, const Element &, const QString &, const Element &, SourceLocation)
static void onWriteDefault (PropertyPass *, const Element &, const QString &, const Element &, const Element &, SourceLocation)

Public Attributes

OnBinding m_onBinding = &onBindingDefault
OnRead m_onRead = &onReadDefault
OnCall m_onCall = &onCallDefault
OnWrite m_onWrite = &onWriteDefault

Detailed Description

Definition at line 283 of file qqmlsa_p.h.

Member Typedef Documentation

◆ OnBinding

Definition at line 304 of file qqmlsa_p.h.

◆ OnCall

Definition at line 306 of file qqmlsa_p.h.

◆ OnRead

Definition at line 305 of file qqmlsa_p.h.

◆ OnWrite

Definition at line 307 of file qqmlsa_p.h.

Member Function Documentation

◆ onBinding()

void QQmlSA::GenericPropertyPass::onBinding ( const Element & element,
const QString & propertyName,
const Binding & binding,
const Element & bindingScope,
const Element & value )
inlineoverridevirtual

Executes whenever a property gets bound to a value.

The property propertyName of element is bound to the value within bindingScope with binding.

Reimplemented from QQmlSA::PropertyPass.

Definition at line 309 of file qqmlsa_p.h.

◆ onBindingDefault()

void QQmlSA::GenericPropertyPass::onBindingDefault ( PropertyPass * ,
const Element & ,
const QString & ,
const Binding & ,
const Element & ,
const Element &  )
inlinestatic

Definition at line 287 of file qqmlsa_p.h.

◆ onCall()

void QQmlSA::GenericPropertyPass::onCall ( const Element & element,
const QString & propertyName,
const Element & readScope,
SourceLocation location )
inlineoverridevirtual

Executes whenever a property or method is called.

The property or method propertyName of element is called as a function by an instruction within readScope defined at location.

Note
Currently only direct calls of methods or properties are supported, indirect calls, for example by storing a method into a JavaScript variable and then calling the variable, are not recognized.

Reimplemented from QQmlSA::PropertyPass.

Definition at line 319 of file qqmlsa_p.h.

◆ onCallDefault()

void QQmlSA::GenericPropertyPass::onCallDefault ( PropertyPass * ,
const Element & ,
const QString & ,
const Element & ,
SourceLocation  )
inlinestatic

Definition at line 295 of file qqmlsa_p.h.

◆ onRead()

void QQmlSA::GenericPropertyPass::onRead ( const Element & element,
const QString & propertyName,
const Element & readScope,
SourceLocation location )
inlineoverridevirtual

Executes whenever a property is read.

The property propertyName of element is read by an instruction within readScope defined at location.

This is also executed if the property propertyName is called as a function as that requires the property to be read first.

Reimplemented from QQmlSA::PropertyPass.

Definition at line 314 of file qqmlsa_p.h.

◆ onReadDefault()

void QQmlSA::GenericPropertyPass::onReadDefault ( PropertyPass * ,
const Element & ,
const QString & ,
const Element & ,
SourceLocation  )
inlinestatic

Definition at line 291 of file qqmlsa_p.h.

◆ onWrite()

void QQmlSA::GenericPropertyPass::onWrite ( const Element & element,
const QString & propertyName,
const Element & value,
const Element & writeScope,
SourceLocation location )
inlineoverridevirtual

Executes whenever a property is written to.

The property propertyName of element is written to by an instruction within writeScope defined at location. The type of the expression written to propertyName is expressionType.

Reimplemented from QQmlSA::PropertyPass.

Definition at line 324 of file qqmlsa_p.h.

◆ onWriteDefault()

void QQmlSA::GenericPropertyPass::onWriteDefault ( PropertyPass * ,
const Element & ,
const QString & ,
const Element & ,
const Element & ,
SourceLocation  )
inlinestatic

Definition at line 299 of file qqmlsa_p.h.

◆ PropertyPass()

QQmlSA::PropertyPass::PropertyPass ( PassManager * manager)

Creates a PropertyPass object and uses manager to refer to the pass manager.

Definition at line 353 of file qqmlsa.cpp.

Member Data Documentation

◆ m_onBinding

OnBinding QQmlSA::GenericPropertyPass::m_onBinding = &onBindingDefault

Definition at line 330 of file qqmlsa_p.h.

◆ m_onCall

OnCall QQmlSA::GenericPropertyPass::m_onCall = &onCallDefault

Definition at line 332 of file qqmlsa_p.h.

◆ m_onRead

OnRead QQmlSA::GenericPropertyPass::m_onRead = &onReadDefault

Definition at line 331 of file qqmlsa_p.h.

◆ m_onWrite

OnWrite QQmlSA::GenericPropertyPass::m_onWrite = &onWriteDefault

Definition at line 333 of file qqmlsa_p.h.


The documentation for this struct was generated from the following file: