![]() |
Qt 6.x
The Qt SDK
|
#include "qqmljsimportvisitor_p.h"
#include "qqmljsmetatypes_p.h"
#include "qqmljsresourcefilemapper_p.h"
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
#include <QtCore/qqueue.h>
#include <QtCore/qscopedvaluerollback.h>
#include <QtCore/qpoint.h>
#include <QtCore/qrect.h>
#include <QtCore/qsize.h>
#include <QtQml/private/qv4codegen_p.h>
#include <QtQml/private/qqmlstringconverters_p.h>
#include <QtQml/private/qqmlirbuilder_p.h>
#include "qqmljsscope_p.h"
#include "qqmljsutils_p.h"
#include "qqmljsloggingutils.h"
#include "qqmlsaconstants.h"
#include <algorithm>
#include <limits>
#include <optional>
#include <variant>
Go to the source code of this file.
Functions | |
void | setScopeName (QQmlJSScope::Ptr &scope, QQmlJSScope::ScopeType type, const QString &name) |
QString | getScopeName (const QQmlJSScope::ConstPtr &scope, QQmlJSScope::ScopeType type) |
template<typename Node > | |
QString | buildName (const Node *node) |
static bool | mayBeUnresolvedGeneralizedGroupedProperty (const QQmlJSScope::ConstPtr &scope) |
static QQmlJSAnnotation::Value | bindingToVariant (QQmlJS::AST::Statement *statement) |
QQmlJSImportVisitor::UnfinishedBinding | createNonUniqueScopeBinding (QQmlJSScope::Ptr &scope, const QString &name, const QQmlJS::SourceLocation &srcLocation) |
void | handleTranslationBinding (QQmlJSMetaPropertyBinding &binding, QStringView base, QQmlJS::AST::ArgumentList *args) |
template<typename F > | |
void | handlePragmaValues (QQmlJS::AST::UiPragma *pragma, F &&assign) |
|
static |
Definition at line 448 of file qqmljsimportvisitor.cpp.
References QQmlJS::AST::ExpressionStatement::expression, and QQmlJS::AST::Node::kind.
Referenced by QQmlJSImportVisitor::parseAnnotations().
Definition at line 64 of file qqmljsimportvisitor.cpp.
Referenced by QQmlJSImportVisitor::parseAnnotations(), QQmlJSImportVisitor::visit(), QQmlJSImportVisitor::visit(), QQmlJSImportVisitor::visit(), QQmlJSImportVisitor::visit(), and QQmlJSImportVisitor::visit().
|
inline |
Creates a new binding of either a GroupProperty or an AttachedProperty type. The binding is added to the parentScope() of scope, under property name name and location srcLocation.
Definition at line 1919 of file qqmljsimportvisitor.cpp.
References QQmlSA::AttachedProperty, QQmlSA::AttachedPropertyScope, createBinding(), QQmlSA::GroupedPropertyScope, QQmlSA::GroupProperty, QQmlJSScope::ownPropertyBindings(), QQmlJSScope::parentScope(), Q_ASSERT, QQmlJSScope::scopeType(), QQmlJSMetaPropertyBinding::setAttachedBinding(), and QQmlJSMetaPropertyBinding::setGroupBinding().
Referenced by QQmlJSImportVisitor::visit(), QQmlJSImportVisitor::visit(), and QQmlJSImportVisitor::visit().
|
inline |
Returns the name of scope based on type.
Definition at line 53 of file qqmljsimportvisitor.cpp.
References QQmlSA::AttachedPropertyScope, QQmlJSScope::baseTypeName(), QQmlSA::GroupedPropertyScope, QQmlJSScope::internalName(), and Q_ASSERT.
Referenced by QQmlJSImportVisitor::addDefaultProperties(), QQmlJSImportVisitor::checkRequiredProperties(), QQmlJSImportVisitor::endVisit(), QQmlJSImportVisitor::endVisit(), QQmlJSImportVisitor::isTypeResolved(), QQmlJSImportVisitor::processPropertyBindingObjects(), and QQmlJSImportVisitor::setAllBindings().
void handlePragmaValues | ( | QQmlJS::AST::UiPragma * | pragma, |
F && | assign | ||
) |
Definition at line 2268 of file qqmljsimportvisitor.cpp.
References QQmlJS::AST::UiPragma::values.
Referenced by QQmlJSImportVisitor::visit().
void handleTranslationBinding | ( | QQmlJSMetaPropertyBinding & | binding, |
QStringView | base, | ||
QQmlJS::AST::ArgumentList * | args | ||
) |
Definition at line 1730 of file qqmljsimportvisitor.cpp.
References args, base, QQmlJSMetaPropertyBinding::setStringLiteral(), QQmlJSMetaPropertyBinding::setTranslation(), QQmlJSMetaPropertyBinding::setTranslationId(), QmlIR::tryGeneratingTranslationBindingBase(), QV4::CompiledData::Binding::Type_Translation, and QV4::CompiledData::Binding::Type_TranslationById.
Referenced by QQmlJSImportVisitor::parseBindingExpression().
|
static |
Definition at line 192 of file qqmljsimportvisitor.cpp.
References QQmlJSScope::baseType(), QQmlSA::GroupedPropertyScope, and QQmlJSScope::scopeType().
|
inline |
Sets the name of scope to name based on type.
Definition at line 39 of file qqmljsimportvisitor.cpp.
References QQmlSA::AttachedPropertyScope, QQmlSA::GroupedPropertyScope, Q_ASSERT, QQmlJSScope::setBaseTypeName(), and QQmlJSScope::setInternalName().