PropertyPass Class

class QQmlSA ::PropertyPass

Base class for all static analysis passes on properties. 更多...

头: #include <PropertyPass>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
继承: QQmlSA::GenericPass
状态: 技术预览

公共函数

PropertyPass (QQmlSA::PassManager * manager )
virtual void onBinding (const QQmlSA::Element & element , const QString & propertyName , const QQmlSA::Binding & binding , const QQmlSA::Element & bindingScope , const QQmlSA::Element & value )
virtual void onRead (const QQmlSA::Element & element , const QString & propertyName , const QQmlSA::Element & readScope , QQmlSA::SourceLocation location )
virtual void onWrite (const QQmlSA::Element & element , const QString & propertyName , const QQmlSA::Element & expressionType , const QQmlSA::Element & writeScope , QQmlSA::SourceLocation location )

详细描述

成员函数文档编制

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

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

[虚拟] void PropertyPass:: 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.

The property propertyName of element is bound to the valuebindingScope with binding .

[虚拟] void PropertyPass:: onRead (const QQmlSA::Element & element , const QString & propertyName , const QQmlSA::Element & readScope , QQmlSA::SourceLocation location )

Executes whenever a property is read.

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

[虚拟] void PropertyPass:: onWrite (const QQmlSA::Element & element , const QString & propertyName , const QQmlSA::Element & expressionType , const QQmlSA::Element & writeScope , QQmlSA::SourceLocation location )

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 .