![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qqmljstyperesolver_p.h>
Public Types | |
| enum | ParentMode { UseDocumentParent , UseParentProperty } |
| enum | CloneMode { CloneTypes , DoNotCloneTypes } |
| enum class | ComponentIsGeneric { No , Yes } |
| enum class | UnaryOperator { Not , Plus , Minus , Increment , Decrement , Complement } |
Protected Types | |
| using | RegisterPair = std::pair<QQmlJSRegisterContent, QQmlJSRegisterContent> |
| using | RegisterMergeCache = QHash<RegisterPair, QQmlJSRegisterContent> |
Definition at line 36 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 318 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 317 of file qqmljstyperesolver_p.h.
| Enumerator | |
|---|---|
| CloneTypes | |
| DoNotCloneTypes | |
Definition at line 55 of file qqmljstyperesolver_p.h.
|
strong |
| Enumerator | |
|---|---|
| No | |
| Yes | |
Definition at line 200 of file qqmljstyperesolver_p.h.
| Enumerator | |
|---|---|
| UseDocumentParent | |
| UseParentProperty | |
Definition at line 51 of file qqmljstyperesolver_p.h.
|
strong |
| Enumerator | |
|---|---|
| Not | |
| Plus | |
| Minus | |
| Increment | |
| Decrement | |
| Complement | |
Definition at line 229 of file qqmljstyperesolver_p.h.
| QQmlJSTypeResolver::QQmlJSTypeResolver | ( | QQmlJSImporter * | importer | ) |
Definition at line 32 of file qqmljstyperesolver.cpp.
| void QQmlJSTypeResolver::adjustOriginalType | ( | QQmlJSRegisterContent | tracked, |
| const QQmlJSScope::ConstPtr & | conversion ) const |
Definition at line 594 of file qqmljstyperesolver.cpp.
|
nodiscard |
Definition at line 581 of file qqmljstyperesolver.cpp.
|
nodiscard |
Definition at line 543 of file qqmljstyperesolver.cpp.
|
nodiscard |
Definition at line 575 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::areEquivalentLists | ( | const QQmlJSScope::ConstPtr & | a, |
| const QQmlJSScope::ConstPtr & | b ) const |
Definition at line 1485 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 97 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::baseType | ( | const QQmlJSScope::ConstPtr & | base, |
| QQmlJSRegisterContent | derived ) const |
Encodes base as a base type of derived and returns a QQmlJSRegisterContent. "Base type" here is understood the same way as std::is_base_of would understand it. That means, if you pass the contained type of derived as base, then derived itself is returned.
Definition at line 1946 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 76 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 79 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 152 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 151 of file qqmljstyperesolver_p.h.
| bool QQmlJSTypeResolver::canConvertFromTo | ( | const QQmlJSScope::ConstPtr & | from, |
| const QQmlJSScope::ConstPtr & | to ) const |
Definition at line 614 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::canConvertFromTo | ( | QQmlJSRegisterContent | from, |
| QQmlJSRegisterContent | to ) const |
Definition at line 643 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::canHold | ( | const QQmlJSScope::ConstPtr & | container, |
| const QQmlJSScope::ConstPtr & | contained ) const |
Definition at line 795 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::canHoldUndefined | ( | QQmlJSRegisterContent | content | ) | const |
Definition at line 835 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::canPopulate | ( | const QQmlJSScope::ConstPtr & | type, |
| const QQmlJSScope::ConstPtr & | argument, | ||
| bool * | isExtension ) const |
Definition at line 1401 of file qqmljstyperesolver.cpp.
|
protected |
Definition at line 1542 of file qqmljstyperesolver.cpp.
|
protected |
Definition at line 1370 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 236 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 57 of file qqmljstyperesolver_p.h.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::consoleObject | ( | ) | const |
Definition at line 213 of file qqmljstyperesolver.cpp.
|
protected |
Definition at line 434 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::convert | ( | QQmlJSRegisterContent | from, |
| const QQmlJSScope::ConstPtr & | to ) const |
Definition at line 2032 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::convert | ( | QQmlJSRegisterContent | from, |
| QQmlJSRegisterContent | to ) const |
Definition at line 2026 of file qqmljstyperesolver.cpp.
|
protected |
Definition at line 1683 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 81 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 82 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::elementType | ( | QQmlJSRegisterContent | list | ) | const |
Definition at line 1886 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 63 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::extensionType | ( | const QQmlJSScope::ConstPtr & | extension, |
| QQmlJSRegisterContent | base ) const |
Definition at line 1932 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::extractNonVoidFromOptionalType | ( | QQmlJSRegisterContent | content | ) | const |
Definition at line 872 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 66 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 98 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 99 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 93 of file qqmljstyperesolver_p.h.
| void QQmlJSTypeResolver::generalizeType | ( | QQmlJSRegisterContent | type | ) | const |
Definition at line 603 of file qqmljstyperesolver.cpp.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::genericType | ( | const QQmlJSScope::ConstPtr & | type, |
| ComponentIsGeneric | allowComponent = ComponentIsGeneric::No ) const |
Definition at line 893 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 121 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 116 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 46 of file qqmljstyperesolver_p.h.
| bool QQmlJSTypeResolver::inherits | ( | const QQmlJSScope::ConstPtr & | derived, |
| const QQmlJSScope::ConstPtr & | base ) const |
Definition at line 1526 of file qqmljstyperesolver.cpp.
| void QQmlJSTypeResolver::init | ( | QQmlJSImportVisitor * | visitor, |
| QQmlJS::AST::Node * | program ) |
Initializes the type resolver. As part of that initialization, makes visitor traverse the program when given.
Definition at line 188 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 69 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 71 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 73 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 67 of file qqmljstyperesolver_p.h.
| bool QQmlJSTypeResolver::isIntegral | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 357 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isIntegral | ( | QQmlJSRegisterContent | type | ) | const |
Definition at line 352 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isNativeArrayIndex | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 428 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isNumeric | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 369 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isNumeric | ( | QQmlJSRegisterContent | type | ) | const |
Definition at line 347 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isOptionalType | ( | QQmlJSRegisterContent | content | ) | const |
Definition at line 857 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 111 of file qqmljstyperesolver_p.h.
| bool QQmlJSTypeResolver::isPrimitive | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 362 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isPrimitive | ( | QQmlJSRegisterContent | type | ) | const |
Definition at line 342 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isSignedInteger | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 416 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isTriviallyCopyable | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 1501 of file qqmljstyperesolver.cpp.
| bool QQmlJSTypeResolver::isUnsignedInteger | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 422 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::iteratorPointer | ( | QQmlJSRegisterContent | listType, |
| QQmlJS::AST::ForEachType | type, | ||
| int | lookupIndex ) const |
Definition at line 1967 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 94 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 102 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 90 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 89 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 1670 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 91 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::literalType | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
The type of a JavaScript literal value appearing in script code
Definition at line 980 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 45 of file qqmljstyperesolver_p.h.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::mathObject | ( | ) | const |
Definition at line 208 of file qqmljstyperesolver.cpp.
|
protected |
Definition at line 1814 of file qqmljstyperesolver.cpp.
|
protected |
Definition at line 1697 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::memberType | ( | QQmlJSRegisterContent | type, |
| const QString & | name, | ||
| int | lookupIndex = QQmlJSRegisterContent::InvalidLookupIndex ) const |
Definition at line 1833 of file qqmljstyperesolver.cpp.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::merge | ( | const QQmlJSScope::ConstPtr & | a, |
| const QQmlJSScope::ConstPtr & | b ) const |
Definition at line 708 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::merge | ( | QQmlJSRegisterContent | a, |
| QQmlJSRegisterContent | b ) const |
Definition at line 655 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 92 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::namedType | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
A type named explicitly, for example in "as"-casts or as function annotation.
Definition at line 1000 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 131 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 64 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 150 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::operationType | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
The type of the result of a JavaScript operation
Definition at line 990 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::original | ( | QQmlJSRegisterContent | type | ) | const |
Definition at line 525 of file qqmljstyperesolver.cpp.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::originalContainedType | ( | QQmlJSRegisterContent | container | ) | const |
Definition at line 531 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 53 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::parentScope | ( | const QQmlJSScope::ConstPtr & | parent, |
| QQmlJSRegisterContent | child ) const |
Encodes parent as a parent scope of child and returns a QQmlJSRegisterContent. "Parent scope" here means any scope above, but also including child. That means, if you pass the contained type of child as parent, then child itself is returned.
Definition at line 1960 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 88 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 96 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 95 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 100 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 65 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 84 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 456 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 44 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 1045 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::returnType | ( | const QQmlJSMetaMethod & | method, |
| const QQmlJSScope::ConstPtr & | returnType, | ||
| QQmlJSRegisterContent | scope ) const |
Definition at line 1925 of file qqmljstyperesolver.cpp.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::scopedType | ( | const QQmlJSScope::ConstPtr & | scope, |
| const QString & | name, | ||
| QQmlJSScopesByIdOptions | options = QQmlJSScopesByIdOption::Default ) const |
Retrieves the type of whatever name signifies in the given scope. name can be an ID, a property of the scope, a singleton, an attachment, a plain type reference or a JavaScript global.
The lookup follows the rules in the internal "Resolving Unqualified Names in QML" documentation (qml-name-resolution.qdoc), as far as the compiler can know the contexts and scope objects involved. User-created contexts are not visible ahead of time. They are only searched after the global object, and script strings, the only code that can run in one as immediate context, are not compiled. The global object, including the JavaScript globals, can therefore be resolved here.
options tells us whether to consider components as bound. If components are bound we can retrieve objects identified by ID in outer contexts.
Names found on the context object (rule 6) are resolved, but the code generator does not generate code for them. The linter warns about them as unqualified access.
Rule 7: If components are bound, the context objects of the lexically enclosing contexts come after the context object and before the global object. They are searched, too, and the code generator does not generate code for names they provide either.
Definition at line 1153 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::scopedType | ( | QQmlJSRegisterContent | scope, |
| const QString & | name, | ||
| int | lookupIndex = QQmlJSRegisterContent::InvalidLookupIndex, | ||
| QQmlJSScopesByIdOptions | options = QQmlJSScopesByIdOption::Default ) const |
Same as the other scopedType method, but accepts a QQmlJSRegisterContent and also returns one. This way you not only get the type, but also the content variant and various meta info.
Definition at line 1243 of file qqmljstyperesolver.cpp.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::scopeForLocation | ( | const QV4::CompiledData::Location & | location | ) | const |
Definition at line 219 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 136 of file qqmljstyperesolver_p.h.
| QQmlJSMetaMethod QQmlJSTypeResolver::selectConstructor | ( | const QQmlJSScope::ConstPtr & | type, |
| const QQmlJSScope::ConstPtr & | argument, | ||
| bool * | isExtension ) const |
Definition at line 1422 of file qqmljstyperesolver.cpp.
Definition at line 56 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 52 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::shadowed | ( | QQmlJSRegisterContent | type | ) | const |
Definition at line 537 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 158 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 75 of file qqmljstyperesolver_p.h.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::storedType | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 1989 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 78 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 77 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::syntheticType | ( | const QQmlJSScope::ConstPtr & | type | ) | const |
Definition at line 1006 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 83 of file qqmljstyperesolver_p.h.
| QQmlJSRegisterContent QQmlJSTypeResolver::typeForArithmeticUnaryOperation | ( | UnaryOperator | op, |
| QQmlJSRegisterContent | operand ) const |
Definition at line 321 of file qqmljstyperesolver.cpp.
| QQmlJSRegisterContent QQmlJSTypeResolver::typeForBinaryOperation | ( | QSOperator::Op | oper, |
| QQmlJSRegisterContent | left, | ||
| QQmlJSRegisterContent | right ) const |
Definition at line 264 of file qqmljstyperesolver.cpp.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::typeForConst | ( | QV4::ReturnedValue | rv | ) | const |
Definition at line 239 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 143 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 126 of file qqmljstyperesolver_p.h.
| QQmlJSScope::ConstPtr QQmlJSTypeResolver::typeFromAST | ( | QQmlJS::AST::Type * | type | ) | const |
Definition at line 227 of file qqmljstyperesolver.cpp.
|
inline |
Definition at line 70 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 72 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 74 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 68 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 80 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 85 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 86 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 87 of file qqmljstyperesolver_p.h.
|
inline |
Definition at line 62 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 325 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 337 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 340 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 371 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 342 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 343 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 322 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 327 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 359 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 360 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 357 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 373 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 366 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 330 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 332 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 334 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 328 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 358 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 362 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 351 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 350 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 352 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 372 of file qqmljstyperesolver_p.h.
|
mutableprotected |
Definition at line 319 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 356 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 323 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 324 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 364 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 365 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 370 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 312 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 349 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 354 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 353 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 355 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 326 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 345 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 368 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 367 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 336 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 339 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 338 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 344 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 331 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 333 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 335 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 329 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 341 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 346 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 347 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 348 of file qqmljstyperesolver_p.h.
|
protected |
Definition at line 321 of file qqmljstyperesolver_p.h.