![]() |
Qt 6.x
The Qt SDK
|
#include <quicklintplugin.h>
Public Member Functions | |
VarBindingTypeValidatorPass (QQmlSA::PassManager *manager, const QMultiHash< QString, TypeDescription > &expectedPropertyTypes) | |
void | onBinding (const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value) override |
Executes whenever a property gets bound to a value. | |
![]() | |
PropertyPass (PassManager *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. | |
![]() | |
GenericPass (PassManager *manager) | |
Creates a generic pass. | |
virtual | ~GenericPass () |
void | emitWarning (QAnyStringView diagnostic, QQmlJS::LoggerWarningId id) |
Emits a warning message diagnostic about an issue of type id. | |
void | emitWarning (QAnyStringView diagnostic, QQmlJS::LoggerWarningId id, QQmlSA::SourceLocation srcLocation) |
Emits warning message diagnostic about an issue of type id located at srcLocation. | |
void | emitWarning (QAnyStringView diagnostic, QQmlJS::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. | |
Definition at line 129 of file quicklintplugin.h.
VarBindingTypeValidatorPass::VarBindingTypeValidatorPass | ( | QQmlSA::PassManager * | manager, |
const QMultiHash< QString, TypeDescription > & | expectedPropertyTypes | ||
) |
Definition at line 426 of file quicklintplugin.cpp.
References QMultiHash< Key, T >::asKeyValueRange(), QMultiHash< Key, T >::insert(), QQmlSA::Element::isNull(), QQmlSA::GenericPass::resolveBuiltinType(), and QQmlSA::GenericPass::resolveType().
|
overridevirtual |
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 444 of file quicklintplugin.cpp.
References QQmlSA::Element::baseType(), QQmlSA::Binding::bindingType(), QQmlSA::GenericPass::emitWarning(), QMultiHash< Key, T >::equal_range(), QQmlSA::Element::isComposite(), QQmlSA::Binding::isLiteralBinding(), it, QQmlSA::Element::name(), QQmlSA::Object, QQmlSA::Binding::objectType(), Q_UNUSED, quickUnexpectedVarType, QQmlSA::GenericPass::resolveLiteralType(), QQmlSA::Script, and QQmlSA::Binding::sourceLocation().