![]() |
Qt 6.x
The Qt SDK
|
#include <quicklintplugin.h>
Public Member Functions | |
ForbiddenChildrenPropertyValidatorPass (QQmlSA::PassManager *manager) | |
void | addWarning (QAnyStringView moduleName, QAnyStringView typeName, QAnyStringView propertyName, QAnyStringView warning) |
bool | shouldRun (const QQmlSA::Element &element) override |
Returns true if the run() function should be executed on the given element. | |
void | run (const QQmlSA::Element &element) override |
Executes if shouldRun() returns true . | |
![]() | |
ElementPass (PassManager *manager) | |
virtual bool | shouldRun (const Element &element) |
Returns true if the run() function should be executed on the given element. | |
virtual void | run (const Element &element)=0 |
Executes if shouldRun() returns true . | |
![]() | |
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 33 of file quicklintplugin.h.
ForbiddenChildrenPropertyValidatorPass::ForbiddenChildrenPropertyValidatorPass | ( | QQmlSA::PassManager * | manager | ) |
Definition at line 19 of file quicklintplugin.cpp.
void ForbiddenChildrenPropertyValidatorPass::addWarning | ( | QAnyStringView | moduleName, |
QAnyStringView | typeName, | ||
QAnyStringView | propertyName, | ||
QAnyStringView | warning | ||
) |
Definition at line 25 of file quicklintplugin.cpp.
References QQmlSA::GenericPass::resolveType(), QAnyStringView::toString(), and typeName.
|
overridevirtual |
Executes if shouldRun()
returns true
.
Performs the real computation of the pass on element.
Implements QQmlSA::ElementPass.
Definition at line 48 of file quicklintplugin.cpp.
References QHash< Key, T >::asKeyValueRange(), QQmlSA::Binding::Bindings::constBegin(), QQmlSA::GenericPass::emitWarning(), QQmlSA::Element::hasOwnPropertyBindings(), QQmlSA::Element::inherits(), QQmlSA::Element::ownPropertyBindings(), QQmlSA::Element::parentScope(), and quickLayoutPositioning.
|
overridevirtual |
Returns true
if the run()
function should be executed on the given element.
Reimplemented from QQmlSA::ElementPass.
Definition at line 35 of file quicklintplugin.cpp.
References QHash< Key, T >::asKeyValueRange(), QQmlSA::Element::inherits(), and QQmlSA::Element::parentScope().