4#ifndef QUICKLINTPLUGIN_H
5#define QUICKLINTPLUGIN_H
7#include <QtCore/qplugin.h>
8#include <QtCore/qlist.h>
9#include <QtCore/qvarlengtharray.h>
10#include <QtCore/qhash.h>
12#include <QtQmlCompiler/qqmlsa.h>
50 QHash<QQmlSA::Element, QVarLengthArray<Warning, 8>> m_types;
76 QVarLengthArray<QQmlSA::Element, 4> allowedTypes;
77 bool allowInDelegate =
false;
80 QHash<QString, Warning> m_attachedTypes;
96 bool isInModuleControls =
true;
97 bool isControl =
false;
98 bool inheritsControl =
false;
102 QList<ControlElement> m_elements;
133 const QMultiHash<QString, TypeDescription> &expectedPropertyTypes);
140 QMultiHash<QString, QQmlSA::Element> m_expectedPropertyTypes;
174 struct ElementAndLocation {
179 QMultiHash<QQmlSA::Element, ElementAndLocation> usedAttachedTypes;
bool shouldRun(const QQmlSA::Element &element) override
Controls whether the run() function should be executed on the given element.
AnchorsValidatorPass(QQmlSA::PassManager *manager)
void run(const QQmlSA::Element &element) override
Executes if shouldRun() returns true.
void onRead(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location) override
Executes whenever a property is read.
AttachedPropertyReuse(QQmlSA::PassManager *manager, QQmlSA::LoggerWarningId category)
void onWrite(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &value, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location) override
Executes whenever a property is written to.
void onRead(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location) override
Executes whenever a property is read.
AttachedPropertyTypeValidatorPass(QQmlSA::PassManager *manager)
void onWrite(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &value, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location) override
Executes whenever a property is written to.
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.
QString addWarning(TypeDescription attachType, QList< TypeDescription > allowedTypes, bool allowInDelegate, QAnyStringView warning)
ControlsNativeValidatorPass(QQmlSA::PassManager *manager)
void run(const QQmlSA::Element &element) override
Executes if shouldRun() returns true.
bool shouldRun(const QQmlSA::Element &element) override
Controls whether the run() function should be executed on the given element.
bool shouldRun(const QQmlSA::Element &element) override
Controls whether the run() function should be executed on the given element.
ControlsSwipeDelegateValidatorPass(QQmlSA::PassManager *manager)
void run(const QQmlSA::Element &element) override
Executes if shouldRun() returns true.
void addWarning(QAnyStringView moduleName, QAnyStringView typeName, QAnyStringView propertyName, QAnyStringView warning)
ForbiddenChildrenPropertyValidatorPass(QQmlSA::PassManager *manager)
void run(const QQmlSA::Element &element) override
Executes if shouldRun() returns true.
bool shouldRun(const QQmlSA::Element &element) override
Controls whether the run() function should be executed on the given element.
void run(const QQmlSA::Element &element) override
Executes if shouldRun() returns true.
PropertyChangesValidatorPass(QQmlSA::PassManager *manager)
bool shouldRun(const QQmlSA::Element &element) override
Controls whether the run() function should be executed on the given element.
PropertyPass(PassManager *manager)
\macro QT_RESTRICTED_CAST_FROM_ASCII
void registerPasses(QQmlSA::PassManager *manager, const QQmlSA::Element &rootElement) override
Adds a pass manager that will be executed on rootElement.
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.
const QLoggingCategory & category()
[1]
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint GLsizei const GLchar * message
#define QmlLintPluginInterface_iid
QDebug warning(QAnyStringView fileName, int lineNumber)
QNetworkAccessManager manager