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
FunctionCallValidator Class Reference
Inheritance diagram for FunctionCallValidator:
Collaboration diagram for FunctionCallValidator:

Public Member Functions

 FunctionCallValidator (PassManager *manager)
void onCall (const Element &element, const QString &propertyName, const Element &readScope, SourceLocation location) override
 Executes whenever a property or method is called.
 FunctionCallValidator (PassManager *manager)
void onCall (const Element &element, const QString &propertyName, const Element &readScope, SourceLocation location) override
 Executes whenever a property or method is called.
Public Member Functions inherited from QQmlSA::PropertyPass
 PropertyPass (PassManager *manager)
 Creates a PropertyPass object and uses manager to refer to the pass manager.
virtual void onBinding (const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value)
 Executes whenever a property gets bound to a value.
virtual void onRead (const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)
 Executes whenever a property is read.
virtual void onWrite (const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &value, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location)
 Executes whenever a property is written to.
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.

Detailed Description

Definition at line 38 of file qdslintplugin.cpp.

Constructor & Destructor Documentation

◆ FunctionCallValidator() [1/2]

FunctionCallValidator::FunctionCallValidator ( PassManager * manager)
inline

Definition at line 41 of file qdslintplugin.cpp.

References FunctionCallValidator().

Referenced by FunctionCallValidator().

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

◆ FunctionCallValidator() [2/2]

FunctionCallValidator::FunctionCallValidator ( PassManager * manager)
inline

Definition at line 41 of file qdslintplugin.cpp.

Member Function Documentation

◆ onCall() [1/2]

void FunctionCallValidator::onCall ( const Element & element,
const QString & propertyName,
const Element & readScope,
SourceLocation location )
overridevirtual

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 218 of file qdslintplugin.cpp.

◆ onCall() [2/2]

void FunctionCallValidator::onCall ( const Element & element,
const QString & propertyName,
const Element & readScope,
SourceLocation location )
overridevirtual

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.


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