このページでは

QQmlSA::PropertyPass Class

class QQmlSA::PropertyPass

プロパティに対するすべての静的解析パスの基底クラスです。詳細...

ヘッダー: #include <qqmlsa.h>
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 onCall(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)
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)

PropertyPass オブジェクトを作成し、manager を使用してパスマネージャーを参照します。

[virtual] void PropertyPass::onBinding(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value)

プロパティが値にバインドされるたびに実行されます。

element のプロパティ `propertyName ` が、bindingScope 内の `value ` に、binding によってバインドされています。

[virtual] void PropertyPass::onCall(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)

プロパティまたはメソッドが呼び出されるたびに実行されます。

element のプロパティまたはメソッド `propertyName ` は、location で定義された `readScope ` 内の命令によって関数として呼び出されます。

注:現在 、メソッドやプロパティの直接呼び出しのみがサポートされています。JavaScript変数にメソッドを格納してからその変数を呼び出すといった間接的な呼び出しは認識されません。

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

プロパティが読み取られるたびに実行されます。

element のプロパティ `propertyName ` は、location で定義されている `readScope ` 内の命令によって読み取られます。

また、プロパティ `propertyName ` が関数として呼び出された場合も、その呼び出しにはまずプロパティの読み取りが必要となるため、これを実行します。

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

プロパティへの書き込みが行われるたびに実行されます。

element のプロパティpropertyName は、location で定義されているwriteScope 内の命令によって書き込まれます。propertyName に書き込まれる式の型はexpressionType です。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.