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>.
Loading...
Searching...
No Matches
qqmldomastcreator_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLDOMASTCREATOR_P_H
5#define QQMLDOMASTCREATOR_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qqmldomelements_p.h"
19#include "qqmldomitem_p.h"
20#include "qqmldompath_p.h"
22
23#include <QtQmlCompiler/private/qqmljsimportvisitor_p.h>
24
25#include <QtQml/private/qqmljsastvisitor_p.h>
26#include <memory>
27#include <type_traits>
28#include <variant>
29
31
32namespace QQmlJS {
33namespace Dom {
34
35class QQmlDomAstCreator final : public AST::Visitor
36{
38 using AST::Visitor::endVisit;
39 using AST::Visitor::visit;
40
41 static constexpr const auto className = "QmlDomAstCreator";
42
43 class DomValue
44 {
45 public:
46 template<typename T>
47 DomValue(const T &obj) : kind(T::kindValue), value(obj)
48 {
49 }
50 DomType kind;
53 value;
54 };
55
56 class QmlStackElement
57 {
58 public:
59 Path path;
60 DomValue item;
61 FileLocations::Tree fileLocations;
62 };
63
77 class ScriptStackElement
78 {
79 public:
80 template<typename T>
81 static ScriptStackElement from(const T &obj)
82 {
83 if constexpr (std::is_same_v<T, ScriptElements::ScriptList>) {
84 ScriptStackElement s{ ScriptElements::ScriptList::kindValue, obj };
85 return s;
86 } else {
87 ScriptStackElement s{ obj->kind(), ScriptElementVariant::fromElement(obj) };
88 return s;
89 }
90 Q_UNREACHABLE();
91 }
92
93 DomType kind;
94 using Variant = std::variant<ScriptElementVariant, ScriptElements::ScriptList>;
95 Variant value;
96
97 ScriptElementVariant takeVariant()
98 {
99 Q_ASSERT_X(std::holds_alternative<ScriptElementVariant>(value), "takeVariant",
100 "Should be a variant, did the parser change?");
101 return std::get<ScriptElementVariant>(std::move(value));
102 }
103
104 bool isList() const { return std::holds_alternative<ScriptElements::ScriptList>(value); };
105
107 {
108 Q_ASSERT_X(std::holds_alternative<ScriptElements::ScriptList>(value), "takeList",
109 "Should be a List, did the parser change?");
110 return std::get<ScriptElements::ScriptList>(std::move(value));
111 }
112
113 void setSemanticScope(const QQmlJSScope::ConstPtr &scope)
114 {
115 if (auto x = std::get_if<ScriptElementVariant>(&value)) {
116 x->base()->setSemanticScope(scope);
117 return;
118 } else if (auto x = std::get_if<ScriptElements::ScriptList>(&value)) {
119 x->setSemanticScope(scope);
120 return;
121 }
122 Q_UNREACHABLE();
123 }
124 };
125
126public:
127 void enableScriptExpressions(bool enable = true) { m_enableScriptExpressions = enable; }
128 void enableLoadFileLazily(bool enable = true) { m_loadFileLazily = enable; }
129
130private:
131
132 MutableDomItem qmlFile;
133 std::shared_ptr<QmlFile> qmlFilePtr;
134 QVector<QmlStackElement> nodeStack;
135 QList<ScriptStackElement> scriptNodeStack;
136 QVector<int> arrayBindingLevels;
137 FileLocations::Tree rootMap;
138 bool m_enableScriptExpressions = false;
139 bool m_loadFileLazily = false;
140
141 // A Binding inside a UiPublicMember (= a Property definition) will shadow the
142 // propertydefinition's binding identifiers with its own binding identifiers. Therefore, disable
143 // bindingIdentifiers for the Binding inside a Property definition by using this flag.
144 bool m_skipBindingIdentifiers = false;
145
146 void setBindingIdentifiers(const Path &pathFromOwner, const AST::UiQualifiedId *identifiers,
147 Binding *bindingPtr);
148 template<typename T>
149 QmlStackElement &currentEl(int idx = 0)
150 {
151 Q_ASSERT_X(idx < nodeStack.size() && idx >= 0, "currentQmlObjectOrComponentEl",
152 "Stack does not contain enough elements!");
153 int i = nodeStack.size() - idx;
154 while (i-- > 0) {
155 DomType k = nodeStack.at(i).item.kind;
156 if (k == T::kindValue)
157 return nodeStack[i];
158 }
159 Q_ASSERT_X(false, "currentEl", "Stack does not contan object of type ");
160 return nodeStack.last();
161 }
162
163 template<typename T>
164 ScriptStackElement &currentScriptEl(int idx = 0)
165 {
166 Q_ASSERT_X(m_enableScriptExpressions, "currentScriptEl",
167 "Cannot access script elements when they are disabled!");
168
169 Q_ASSERT_X(idx < scriptNodeStack.size() && idx >= 0, "currentQmlObjectOrComponentEl",
170 "Stack does not contain enough elements!");
171 int i = scriptNodeStack.size() - idx;
172 while (i-- > 0) {
173 DomType k = scriptNodeStack.at(i).kind;
174 if (k == T::element_type::kindValue)
175 return scriptNodeStack[i];
176 }
177 Q_ASSERT_X(false, "currentEl", "Stack does not contain object of type ");
178 return scriptNodeStack.last();
179 }
180
181 template<typename T>
182 T &current(int idx = 0)
183 {
184 return std::get<T>(currentEl<T>(idx).item.value);
185 }
186
187 index_type currentIndex() { return currentNodeEl().path.last().headIndex(); }
188
189 QmlStackElement &currentQmlObjectOrComponentEl(int idx = 0);
190
191 QmlStackElement &currentNodeEl(int i = 0);
192 ScriptStackElement &currentScriptNodeEl(int i = 0);
193
194 DomValue &currentNode(int i = 0);
195
196 void removeCurrentNode(std::optional<DomType> expectedType);
197 void removeCurrentScriptNode(std::optional<DomType> expectedType);
198
199 void pushEl(const Path &p, const DomValue &it, AST::Node *n)
200 {
201 nodeStack.append({ p, it, createMap(it.kind, p, n) });
202 }
203
204 FileLocations::Tree createMap(const FileLocations::Tree &base, const Path &p, AST::Node *n);
205
206 FileLocations::Tree createMap(DomType k, const Path &p, AST::Node *n);
207
208 const ScriptElementVariant &
209 finalizeScriptExpression(const ScriptElementVariant &element, const Path &pathFromOwner,
210 const FileLocations::Tree &ownerFileLocations);
211
212 void setScriptExpression (const std::shared_ptr<ScriptExpression>& value);
213
214 Path pathOfLastScriptNode() const;
215
220 template<typename AstNodeT>
221 static std::shared_ptr<ScriptElements::Literal> makeStringLiteral(QStringView value,
222 AstNodeT *ast)
223 {
224 auto myExp = std::make_shared<ScriptElements::Literal>(ast->firstSourceLocation(),
225 ast->lastSourceLocation());
226 myExp->setLiteralValue(value.toString());
227 return myExp;
228 }
229
230 static std::shared_ptr<ScriptElements::Literal> makeStringLiteral(QStringView value,
232 {
233 auto myExp = std::make_shared<ScriptElements::Literal>(loc);
234 myExp->setLiteralValue(value.toString());
235 return myExp;
236 }
237
244 template<typename ScriptElementT, typename AstNodeT,
245 typename Enable =
246 std::enable_if_t<!std::is_same_v<ScriptElementT, ScriptElements::ScriptList>>>
247 static decltype(auto) makeScriptElement(AstNodeT *ast)
248 {
249 auto myExp = std::make_shared<ScriptElementT>(ast->firstSourceLocation(),
250 ast->lastSourceLocation());
251 return myExp;
252 }
253
259 template<typename AstNodeT>
260 static std::shared_ptr<ScriptElements::GenericScriptElement>
261 makeGenericScriptElement(AstNodeT *ast, DomType kind)
262 {
263 auto myExp = std::make_shared<ScriptElements::GenericScriptElement>(
264 ast->firstSourceLocation(), ast->lastSourceLocation());
265 myExp->setKind(kind);
266 return myExp;
267 }
268
269 enum UnaryExpressionKind { Prefix, Postfix };
270 std::shared_ptr<ScriptElements::GenericScriptElement>
271 makeUnaryExpression(AST::Node *expression, QQmlJS::SourceLocation operatorToken,
272 bool hasExpression, UnaryExpressionKind type);
273
274 static std::shared_ptr<ScriptElements::GenericScriptElement>
275 makeGenericScriptElement(SourceLocation location, DomType kind)
276 {
277 auto myExp = std::make_shared<ScriptElements::GenericScriptElement>(location);
278 myExp->setKind(kind);
279 return myExp;
280 }
281
287 template<typename AstNodeT>
288 static decltype(auto) makeScriptList(AstNodeT *ast)
289 {
290 auto myExp =
291 ScriptElements::ScriptList(ast->firstSourceLocation(), ast->lastSourceLocation());
292 return myExp;
293 }
294
295 template<typename ScriptElementT>
296 void pushScriptElement(const ScriptElementT &element)
297 {
298 Q_ASSERT_X(m_enableScriptExpressions, "pushScriptElement",
299 "Cannot create script elements when they are disabled!");
300 scriptNodeStack.append(ScriptStackElement::from(element));
301 }
302
303 void disableScriptElements()
304 {
305 m_enableScriptExpressions = false;
306 scriptNodeStack.clear();
307 }
308
309 ScriptElementVariant scriptElementForQualifiedId(AST::UiQualifiedId *expression);
310
311public:
312 explicit QQmlDomAstCreator(const MutableDomItem &qmlFile);
313
314 bool visit(AST::UiProgram *program) override;
315 void endVisit(AST::UiProgram *) override;
316
317 bool visit(AST::UiPragma *el) override;
318
319 bool visit(AST::UiImport *el) override;
320
321 bool visit(AST::UiPublicMember *el) override;
322 void endVisit(AST::UiPublicMember *el) override;
323
324 bool visit(AST::FunctionDeclaration *el) override;
325 void endVisit(AST::FunctionDeclaration *) override;
326
327 bool visit(AST::UiSourceElement *el) override;
328 void endVisit(AST::UiSourceElement *) override;
329
331
332 bool visit(AST::UiObjectDefinition *el) override;
333 void endVisit(AST::UiObjectDefinition *) override;
334
335 bool visit(AST::UiObjectBinding *el) override;
336 void endVisit(AST::UiObjectBinding *) override;
337
338 bool visit(AST::UiScriptBinding *el) override;
339 void endVisit(AST::UiScriptBinding *) override;
340
341 bool visit(AST::UiArrayBinding *el) override;
342 void endVisit(AST::UiArrayBinding *) override;
343
344 bool visit(AST::UiQualifiedId *) override;
345
346 bool visit(AST::UiEnumDeclaration *el) override;
347 void endVisit(AST::UiEnumDeclaration *) override;
348
349 bool visit(AST::UiEnumMemberList *el) override;
350 void endVisit(AST::UiEnumMemberList *el) override;
351
352 bool visit(AST::UiInlineComponent *el) override;
353 void endVisit(AST::UiInlineComponent *) override;
354
355 bool visit(AST::UiRequired *el) override;
356
357 bool visit(AST::UiAnnotation *el) override;
358 void endVisit(AST::UiAnnotation *) override;
359
360 // for Script elements:
361 bool visit(AST::BinaryExpression *exp) override;
362 void endVisit(AST::BinaryExpression *exp) override;
363
364 bool visit(AST::Block *block) override;
365 void endVisit(AST::Block *) override;
366
367 bool visit(AST::ReturnStatement *block) override;
368 void endVisit(AST::ReturnStatement *) override;
369
370 bool visit(AST::ForStatement *forStatement) override;
371 void endVisit(AST::ForStatement *forStatement) override;
372
373 bool visit(AST::PatternElement *pe) override;
374 void endVisit(AST::PatternElement *pe) override;
376 const std::shared_ptr<ScriptElements::GenericScriptElement> &element);
377
378 bool visit(AST::IfStatement *) override;
379 void endVisit(AST::IfStatement *) override;
380
381 bool visit(AST::FieldMemberExpression *) override;
382 void endVisit(AST::FieldMemberExpression *) override;
383
384 bool visit(AST::ArrayMemberExpression *) override;
385 void endVisit(AST::ArrayMemberExpression *) override;
386
387 bool visit(AST::CallExpression *) override;
388 void endVisit(AST::CallExpression *) override;
389
390 bool visit(AST::ArrayPattern *) override;
391 void endVisit(AST::ArrayPattern *) override;
392
393 bool visit(AST::ObjectPattern *) override;
394 void endVisit(AST::ObjectPattern *) override;
395
396 bool visit(AST::PatternProperty *) override;
397 void endVisit(AST::PatternProperty *) override;
398
399 bool visit(AST::VariableStatement *) override;
400 void endVisit(AST::VariableStatement *) override;
401
402 bool visit(AST::Type *expression) override;
403 void endVisit(AST::Type *expression) override;
404
405 bool visit(AST::DefaultClause *) override;
406 void endVisit(AST::DefaultClause *) override;
407
408 bool visit(AST::CaseClause *) override;
409 void endVisit(AST::CaseClause *) override;
410
411 bool visit(AST::CaseClauses *) override;
412 void endVisit(AST::CaseClauses *) override;
413
414 bool visit(AST::CaseBlock *) override;
415 void endVisit(AST::CaseBlock *) override;
416
417 bool visit(AST::SwitchStatement *) override;
418 void endVisit(AST::SwitchStatement *) override;
419
420 bool visit(AST::WhileStatement *) override;
421 void endVisit(AST::WhileStatement *) override;
422
423 bool visit(AST::DoWhileStatement *) override;
424 void endVisit(AST::DoWhileStatement *) override;
425
426 bool visit(AST::ForEachStatement *) override;
427 void endVisit(AST::ForEachStatement *) override;
428
429 bool visit(AST::ClassExpression *) override;
430 void endVisit(AST::ClassExpression *) override;
431
432 bool visit(AST::TemplateLiteral *) override;
433
434 bool visit(AST::TryStatement *) override;
435 void endVisit(AST::TryStatement *) override;
436
437 bool visit(AST::Catch *) override;
438 void endVisit(AST::Catch *) override;
439
440 bool visit(AST::Finally *) override;
441 void endVisit(AST::Finally *) override;
442
443 bool visit(AST::ThrowStatement *) override;
444 void endVisit(AST::ThrowStatement *) override;
445
446 bool visit(AST::LabelledStatement *) override;
447 void endVisit(AST::LabelledStatement *) override;
448
449 bool visit(AST::ContinueStatement *) override;
450 void endVisit(AST::ContinueStatement *) override;
451
452 bool visit(AST::BreakStatement *) override;
453 void endVisit(AST::BreakStatement *) override;
454
455 bool visit(AST::Expression *) override;
456 void endVisit(AST::Expression *) override;
457
458 bool visit(AST::ConditionalExpression *) override;
459 void endVisit(AST::ConditionalExpression *) override;
460
461 bool visit(AST::UnaryMinusExpression *) override;
462 void endVisit(AST::UnaryMinusExpression *) override;
463
464 bool visit(AST::UnaryPlusExpression *) override;
465 void endVisit(AST::UnaryPlusExpression *) override;
466
467 bool visit(AST::TildeExpression *) override;
468 void endVisit(AST::TildeExpression *) override;
469
470 bool visit(AST::NotExpression *) override;
471 void endVisit(AST::NotExpression *) override;
472
473 bool visit(AST::TypeOfExpression *) override;
474 void endVisit(AST::TypeOfExpression *) override;
475
476 bool visit(AST::DeleteExpression *) override;
477 void endVisit(AST::DeleteExpression *) override;
478
479 bool visit(AST::VoidExpression *) override;
480 void endVisit(AST::VoidExpression *) override;
481
482 bool visit(AST::PostDecrementExpression *) override;
483 void endVisit(AST::PostDecrementExpression *) override;
484
485 bool visit(AST::PostIncrementExpression *) override;
486 void endVisit(AST::PostIncrementExpression *) override;
487
488 bool visit(AST::PreDecrementExpression *) override;
489 void endVisit(AST::PreDecrementExpression *) override;
490
491 bool visit(AST::PreIncrementExpression *) override;
492 void endVisit(AST::PreIncrementExpression *) override;
493
494 bool visit(AST::EmptyStatement *) override;
495 void endVisit(AST::EmptyStatement *) override;
496
497 bool visit(AST::NestedExpression *) override;
498 void endVisit(AST::NestedExpression *) override;
499
500 // lists of stuff whose children do not need a qqmljsscope: visitation order can be custom
501 bool visit(AST::ArgumentList *) override;
502 bool visit(AST::UiParameterList *) override;
503 bool visit(AST::PatternElementList *) override;
504 bool visit(AST::PatternPropertyList *) override;
505 bool visit(AST::VariableDeclarationList *vdl) override;
506 bool visit(AST::Elision *elision) override;
507
508 // lists of stuff whose children need a qqmljsscope: visitation order cannot be custom
509 bool visit(AST::StatementList *list) override;
510 void endVisit(AST::StatementList *list) override;
511
512 // literals and ids
513 bool visit(AST::IdentifierExpression *expression) override;
514 bool visit(AST::NumericLiteral *expression) override;
515 bool visit(AST::StringLiteral *expression) override;
516 bool visit(AST::NullExpression *expression) override;
517 bool visit(AST::TrueLiteral *expression) override;
518 bool visit(AST::FalseLiteral *expression) override;
519 bool visit(AST::ComputedPropertyName *expression) override;
520 bool visit(AST::IdentifierPropertyName *expression) override;
521 bool visit(AST::NumericLiteralPropertyName *expression) override;
522 bool visit(AST::StringLiteralPropertyName *expression) override;
523 bool visit(AST::TypeAnnotation *expression) override;
524
525 void throwRecursionDepthError() override;
526
527public:
529};
530
532{
533public:
535 QQmlJSLogger *logger, QQmlJSImporter *importer);
536
537#define X(name) \
538 bool visit(AST::name *) override; \
539 void endVisit(AST::name *) override;
541#undef X
542
543 virtual void throwRecursionDepthError() override;
550 {
551 m_enableScriptExpressions = enable;
552 m_domCreator.enableScriptExpressions(enable);
553 }
554
555 void enableLoadFileLazily(bool enable = true)
556 {
557 m_loadFileLazily = enable;
558 m_domCreator.enableLoadFileLazily(enable);
559 }
560
561 QQmlJSImportVisitor &scopeCreator() { return m_scopeCreator; }
562
563private:
564 void setScopeInDomAfterEndvisit();
565 void setScopeInDomBeforeEndvisit();
566
567 template<typename U, typename... V>
568 using IsInList = std::disjunction<std::is_same<U, V>...>;
569 template<typename U>
570 using RequiresCustomIteration = IsInList<U, AST::PatternElementList, AST::PatternPropertyList,
572
573 enum VisitorKind : bool { DomCreator, ScopeCreator };
579 struct InactiveVisitorMarker
580 {
582 AST::Node::Kind nodeKind;
583 VisitorKind inactiveVisitorKind;
584
585 VisitorKind stillActiveVisitorKind() const
586 {
587 return inactiveVisitorKind == DomCreator ? ScopeCreator : DomCreator;
588 }
589 };
590
591 template<typename T>
592 void customListIteration(T *t)
593 {
594 static_assert(RequiresCustomIteration<T>::value);
595 for (auto it = t; it; it = it->next) {
596 if constexpr (std::is_same_v<T, AST::PatternElementList>) {
597 AST::Node::accept(it->elision, this);
598 AST::Node::accept(it->element, this);
599 } else if constexpr (std::is_same_v<T, AST::PatternPropertyList>) {
600 AST::Node::accept(it->property, this);
601 } else if constexpr (std::is_same_v<T, AST::FormalParameterList>) {
602 AST::Node::accept(it->element, this);
603 } else {
604 Q_UNREACHABLE();
605 }
606 }
607 }
608
609 static void initMarkerForActiveVisitor(std::optional<InactiveVisitorMarker> &inactiveVisitorMarker,
610 AST::Node::Kind nodeKind, bool continueForDom)
611 {
612 inactiveVisitorMarker.emplace();
613 inactiveVisitorMarker->inactiveVisitorKind = continueForDom ? ScopeCreator : DomCreator;
614 inactiveVisitorMarker->count = 1;
615 inactiveVisitorMarker->nodeKind = nodeKind;
616 };
617
618 template<typename T>
619 bool performListIterationIfRequired(T *t)
620 {
621 if constexpr (RequiresCustomIteration<T>::value) {
622 customListIteration(t);
623 return false;
624 }
625 Q_UNUSED(t);
626 return true;
627 }
628
629 template<typename T>
630 bool visitT(T *t)
631 {
632 const auto handleVisitResult = [this, t](const bool continueVisit) {
633 if (m_inactiveVisitorMarker && m_inactiveVisitorMarker->nodeKind == t->kind)
634 m_inactiveVisitorMarker->count += 1;
635
636 if (continueVisit)
637 return performListIterationIfRequired(t);
638 return continueVisit;
639 };
640
641 // first case: no marker, both can visit
642 if (!m_inactiveVisitorMarker) {
643 bool continueForDom = m_domCreator.visit(t);
644 bool continueForScope = m_scopeCreator.visit(t);
645 if (!continueForDom && !continueForScope)
646 return false;
647 else if (continueForDom ^ continueForScope) {
648 initMarkerForActiveVisitor(m_inactiveVisitorMarker, AST::Node::Kind(t->kind),
649 continueForDom);
650 return performListIterationIfRequired(t);
651 } else {
652 Q_ASSERT(continueForDom && continueForScope);
653 return performListIterationIfRequired(t);
654 }
655 Q_UNREACHABLE();
656 }
657
658 // second case: a marker, just one visit
659 switch (m_inactiveVisitorMarker->stillActiveVisitorKind()) {
660 case DomCreator:
661 return handleVisitResult(m_domCreator.visit(t));
662 case ScopeCreator:
663 return handleVisitResult(m_scopeCreator.visit(t));
664 };
665 Q_UNREACHABLE();
666 }
667
668 template<typename T>
669 void endVisitT(T *t)
670 {
671 if (m_inactiveVisitorMarker && m_inactiveVisitorMarker->nodeKind == t->kind) {
672 m_inactiveVisitorMarker->count -= 1;
673 if (m_inactiveVisitorMarker->count == 0)
674 m_inactiveVisitorMarker.reset();
675 }
676 if (m_inactiveVisitorMarker) {
677 switch (m_inactiveVisitorMarker->stillActiveVisitorKind()) {
678 case DomCreator:
679 m_domCreator.endVisit(t);
680 return;
681 case ScopeCreator:
682 m_scopeCreator.endVisit(t);
683 return;
684 };
685 Q_UNREACHABLE();
686 }
687
688 setScopeInDomBeforeEndvisit();
689 m_domCreator.endVisit(t);
690 setScopeInDomAfterEndvisit();
691 m_scopeCreator.endVisit(t);
692 }
693
694 QQmlJSScope::Ptr m_root;
695 QQmlJSLogger *m_logger = nullptr;
696 QQmlJSImporter *m_importer = nullptr;
697 QString m_implicitImportDirectory;
698 QQmlJSImportVisitor m_scopeCreator;
699 QQmlDomAstCreator m_domCreator;
700
701 std::optional<InactiveVisitorMarker> m_inactiveVisitorMarker;
702 bool m_enableScriptExpressions = false;
703 bool m_loadFileLazily = false;
704};
705
706} // end namespace Dom
707} // end namespace QQmlJS
708
710#endif // QQMLDOMASTCREATOR_P_H
void endVisit(QQmlJS::AST::ExpressionStatement *ast) override
bool visit(QQmlJS::AST::StringLiteral *) override
void accept(BaseVisitor *visitor)
std::shared_ptr< AttachedInfoT< FileLocations > > Tree
index_type headIndex(index_type defaultValue=-1) const
Path last() const
virtual QQmlJSASTClassListToVisit void throwRecursionDepthError() override
QQmlDomAstCreatorWithQQmlJSScope(const QQmlJSScope::Ptr &current, MutableDomItem &qmlFile, QQmlJSLogger *logger, QQmlJSImporter *importer)
void endVisit(AST::UiProgram *) override
void enableLoadFileLazily(bool enable=true)
void endVisitHelper(AST::PatternElement *pe, const std::shared_ptr< ScriptElements::GenericScriptElement > &element)
void enableScriptExpressions(bool enable=true)
QQmlDomAstCreator(const MutableDomItem &qmlFile)
bool visit(AST::UiProgram *program) override
void loadAnnotations(AST::UiObjectMember *el)
Use this to contain any script element.
static ScriptElementVariant fromElement(const T &element)
\inmodule QtCore
Definition qstringview.h:78
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QSet< QString >::iterator it
qint64 index_type
Combined button and popup list for selecting options.
#define Q_DECLARE_TR_FUNCTIONS(context)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint location
GLint GLint GLint GLint GLint x
[0]
GLenum GLenum GLsizei count
GLenum type
GLboolean enable
GLuint program
GLfloat n
GLhandleARB obj
[2]
GLdouble s
[6]
Definition qopenglext.h:235
GLdouble GLdouble t
Definition qopenglext.h:243
GLsizei const GLchar *const * path
GLfloat GLfloat p
[1]
#define QQmlJSASTClassListToVisit
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define Q_ASSERT_X(cond, x, msg)
Definition qrandom.cpp:48
#define Q_UNUSED(x)
ptrdiff_t qsizetype
Definition qtypes.h:165
static const uint base
Definition qurlidna.cpp:20
QList< int > list
[14]
QGraphicsItem * item
QStringView el