Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
\inmodule QtQmlCompiler More...
#include <qqmlsa.h>
Public Member Functions | |
Element () | |
Element (const Element &) | |
Element (Element &&other) noexcept | |
Element & | operator= (const Element &) |
~Element () | |
ScopeType | scopeType () const |
Returns the type of Element's scope. | |
Element | baseType () const |
Returns the Element this Element derives from. | |
QString | baseTypeName () const |
Returns the name of the Element this Element derives from. | |
Element | parentScope () const |
Returns the Element that encloses this Element. | |
bool | inherits (const Element &) const |
Returns whether this Element inherits from element. | |
bool | isNull () const |
QString | internalId () const |
AccessSemantics | accessSemantics () const |
Returns the access semantics of this Element. | |
bool | isComposite () const |
Returns true for objects defined from Qml, and false for objects declared from C++. | |
bool | hasProperty (const QString &propertyName) const |
Returns whether this Element has a property with the name propertyName. | |
bool | hasOwnProperty (const QString &propertyName) const |
Returns whether this Element defines a property with the name propertyName which is not defined on its base or extension objects. | |
Property | property (const QString &propertyName) const |
Returns the property with the name propertyName if it is found in this Element or its base and extension objects, otherwise returns an invalid property. | |
bool | isPropertyRequired (const QString &propertyName) const |
Returns whether the property with the name propertyName resolved on this Element is required. | |
QString | defaultPropertyName () const |
Returns the name of the default property of this Element. | |
bool | hasMethod (const QString &methodName) const |
Returns whether this Element has a method with the name methodName. | |
Method::Methods | ownMethods () const |
Returns this Elements's methods, which are not defined on its base or extension objects. | |
QQmlSA::SourceLocation | sourceLocation () const |
Returns the location in the QML code where this Element is defined. | |
QString | filePath () const |
Returns the file path of the QML code that defines this Element. | |
bool | hasPropertyBindings (const QString &name) const |
Returns whether this Element has a property binding with the name name. | |
bool | hasOwnPropertyBindings (const QString &propertyName) const |
Returns whether this Element has property bindings which are not defined in its base or extension objects and that have name propertyName. | |
Binding::Bindings | ownPropertyBindings () const |
Returns this Element's property bindings which are not defined on its base or extension objects. | |
Binding::Bindings | ownPropertyBindings (const QString &propertyName) const |
Returns this Element's property bindings which are not defined on its base or extension objects and that have the name propertyName. | |
QList< Binding > | propertyBindings (const QString &propertyName) const |
Returns this Element's property bindings that have the name propertyName. | |
operator bool () const | |
bool | operator! () const |
QString | name () const |
Returns the name of this Element. | |
Friends | |
class | QT_PREPEND_NAMESPACE (QQmlJSScope) |
bool | operator== (const QQmlSA::Element &lhs, const QQmlSA::Element &rhs) |
bool | operator!= (const Element &lhs, const Element &rhs) |
qsizetype | qHash (const Element &key, qsizetype seed=0) noexcept |
void | swap (Element &lhs, Element &rhs) noexcept |
QQmlSA::Element::Element | ( | ) |
Definition at line 556 of file qqmlsa.cpp.
QQmlSA::Element::Element | ( | const Element & | other | ) |
Definition at line 561 of file qqmlsa.cpp.
References other(), and QQmlJSScope::scope().
|
inlinenoexcept |
QQmlSA::Element::~Element | ( | ) |
Definition at line 575 of file qqmlsa.cpp.
AccessSemantics QQmlSA::Element::accessSemantics | ( | ) | const |
Returns the access semantics of this Element.
For example, Reference, Value or Sequence.
Definition at line 637 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Element QQmlSA::Element::baseType | ( | ) | const |
Returns the Element this Element derives from.
Definition at line 591 of file qqmlsa.cpp.
References QQmlJSScope::createQQmlSAElement(), and QQmlJSScope::scope().
Referenced by QQmlSA::PassManagerPrivate::analyzeBinding(), QQmlSA::lookupName(), AttachedPropertyTypeValidatorPass::onBinding(), VarBindingTypeValidatorPass::onBinding(), and AttachedPropertyReuse::onRead().
QString QQmlSA::Element::baseTypeName | ( | ) | const |
Returns the name of the Element this Element derives from.
Definition at line 599 of file qqmlsa.cpp.
References QQmlJSScope::prettyName(), and QQmlJSScope::scope().
Referenced by QQmlSA::DebugPropertyPass::onBinding(), QQmlSA::DebugPropertyPass::onRead(), QQmlSA::DebugPropertyPass::onWrite(), and QQmlSA::DebugElementPass::run().
QString QQmlSA::Element::defaultPropertyName | ( | ) | const |
Returns the name of the default property of this Element.
If it doesn't have one, returns an empty string.
Definition at line 689 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Referenced by QQmlSA::DebugElementPass::run().
QString QQmlSA::Element::filePath | ( | ) | const |
Returns the file path of the QML code that defines this Element.
Definition at line 730 of file qqmlsa.cpp.
References QQmlJSScope::scope().
bool QQmlSA::Element::hasMethod | ( | const QString & | methodName | ) | const |
Returns whether this Element has a method with the name methodName.
Definition at line 697 of file qqmlsa.cpp.
References methodName(), and QQmlJSScope::scope().
Referenced by AttachedPropertyTypeValidatorPass::onRead(), and AttachedPropertyReuse::onRead().
bool QQmlSA::Element::hasOwnProperty | ( | const QString & | propertyName | ) | const |
Returns whether this Element defines a property with the name propertyName which is not defined on its base or extension objects.
Definition at line 662 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Referenced by LiteralBindingCheckBase::onBinding().
bool QQmlSA::Element::hasOwnPropertyBindings | ( | const QString & | propertyName | ) | const |
Returns whether this Element has property bindings which are not defined in its base or extension objects and that have name propertyName.
Definition at line 747 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Referenced by ForbiddenChildrenPropertyValidatorPass::run(), ControlsNativeValidatorPass::run(), and AnchorsValidatorPass::shouldRun().
bool QQmlSA::Element::hasProperty | ( | const QString & | propertyName | ) | const |
Returns whether this Element has a property with the name propertyName.
Definition at line 653 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Referenced by AttachedPropertyTypeValidatorPass::onRead(), AttachedPropertyReuse::onRead(), and PropertyChangesValidatorPass::run().
bool QQmlSA::Element::hasPropertyBindings | ( | const QString & | name | ) | const |
Returns whether this Element has a property binding with the name name.
Definition at line 738 of file qqmlsa.cpp.
References QQmlJSScope::scope().
bool QQmlSA::Element::inherits | ( | const Element & | element | ) | const |
Returns whether this Element inherits from element.
Definition at line 615 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Referenced by ControlsNativeValidatorPass::ControlsNativeValidatorPass(), ForbiddenChildrenPropertyValidatorPass::run(), ControlsNativeValidatorPass::run(), ForbiddenChildrenPropertyValidatorPass::shouldRun(), ControlsNativeValidatorPass::shouldRun(), AnchorsValidatorPass::shouldRun(), ControlsSwipeDelegateValidatorPass::shouldRun(), and PropertyChangesValidatorPass::shouldRun().
QString QQmlSA::Element::internalId | ( | ) | const |
Definition at line 628 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Referenced by AttachedPropertyTypeValidatorPass::addWarning().
bool QQmlSA::Element::isComposite | ( | ) | const |
Returns true for objects defined from Qml, and false for objects declared from C++.
Definition at line 645 of file qqmlsa.cpp.
References isComposite(), and QQmlJSScope::scope().
Referenced by isComposite(), and VarBindingTypeValidatorPass::onBinding().
bool QQmlSA::Element::isNull | ( | ) | const |
Definition at line 620 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Referenced by ControlsNativeValidatorPass::ControlsNativeValidatorPass(), VarBindingTypeValidatorPass::VarBindingTypeValidatorPass(), QQmlSA::PassManagerPrivate::addBindingSourceLocations(), QQmlSA::PassManagerPrivate::analyzeBinding(), QQmlSA::lookupName(), name(), AnchorsValidatorPass::shouldRun(), ControlsSwipeDelegateValidatorPass::shouldRun(), and PropertyChangesValidatorPass::shouldRun().
bool QQmlSA::Element::isPropertyRequired | ( | const QString & | propertyName | ) | const |
Returns whether the property with the name propertyName resolved on this Element is required.
Returns false if the the property couldn't be found.
Definition at line 680 of file qqmlsa.cpp.
References QQmlJSScope::scope().
QString QQmlSA::Element::name | ( | ) | const |
Returns the name of this Element.
Definition at line 825 of file qqmlsa.cpp.
References isNull(), QQmlJSScope::prettyName(), and QQmlJSScope::scope().
Referenced by ControlsNativeValidatorPass::ControlsNativeValidatorPass(), VarBindingTypeValidatorPass::onBinding(), and AttachedPropertyReuse::onRead().
|
explicit |
Definition at line 812 of file qqmlsa.cpp.
References QQmlJSScope::scope().
bool QQmlSA::Element::operator! | ( | ) | const |
Definition at line 817 of file qqmlsa.cpp.
References QQmlJSScope::scope().
Definition at line 566 of file qqmlsa.cpp.
References other(), and QQmlJSScope::scope().
Method::Methods QQmlSA::Element::ownMethods | ( | ) | const |
Returns this Elements's methods, which are not defined on its base or extension objects.
Definition at line 713 of file qqmlsa.cpp.
References QQmlSA::MethodsPrivate::createMethods(), and QQmlJSScope::scope().
Binding::Bindings QQmlSA::Element::ownPropertyBindings | ( | ) | const |
Returns this Element's property bindings which are not defined on its base or extension objects.
Definition at line 756 of file qqmlsa.cpp.
References QQmlSA::BindingsPrivate::createBindings(), and QQmlJSScope::scope().
Referenced by QQmlSA::PassManagerPrivate::addBindingSourceLocations(), ForbiddenChildrenPropertyValidatorPass::run(), AnchorsValidatorPass::run(), ControlsSwipeDelegateValidatorPass::run(), and PropertyChangesValidatorPass::run().
Binding::Bindings QQmlSA::Element::ownPropertyBindings | ( | const QString & | propertyName | ) | const |
Returns this Element's property bindings which are not defined on its base or extension objects and that have the name propertyName.
Definition at line 765 of file qqmlsa.cpp.
References QQmlSA::BindingsPrivate::createBindings(), and QQmlJSScope::scope().
Element QQmlSA::Element::parentScope | ( | ) | const |
Returns the Element that encloses this Element.
Definition at line 607 of file qqmlsa.cpp.
References QQmlJSScope::createQQmlSAElement(), and QQmlJSScope::scope().
Referenced by AttachedPropertyReuse::onRead(), ForbiddenChildrenPropertyValidatorPass::run(), and ForbiddenChildrenPropertyValidatorPass::shouldRun().
QQmlSA::Property QQmlSA::Element::property | ( | const QString & | propertyName | ) | const |
Returns the property with the name propertyName if it is found in this Element or its base and extension objects, otherwise returns an invalid property.
Definition at line 671 of file qqmlsa.cpp.
References QQmlSA::PropertyPrivate::createProperty(), and QQmlJSScope::scope().
Referenced by LiteralBindingCheckBase::getProperty().
Returns this Element's property bindings that have the name propertyName.
Definition at line 774 of file qqmlsa.cpp.
References QQmlSA::BindingPrivate::createBinding(), and QQmlJSScope::scope().
Referenced by QQmlSA::DebugElementPass::run(), AnchorsValidatorPass::run(), and ControlsSwipeDelegateValidatorPass::run().
QQmlJSScope::ScopeType QQmlSA::Element::scopeType | ( | ) | const |
Returns the type of Element's scope.
Definition at line 583 of file qqmlsa.cpp.
References QQmlJSScope::scope().
QQmlSA::SourceLocation QQmlSA::Element::sourceLocation | ( | ) | const |
Returns the location in the QML code where this Element is defined.
Definition at line 721 of file qqmlsa.cpp.
References QQmlSA::SourceLocationPrivate::createQQmlSASourceLocation(), and QQmlJSScope::scope().
Referenced by QQmlSA::PassManagerPrivate::addBindingSourceLocations(), and ControlsNativeValidatorPass::run().
|
friend |
|
friend |