23#include <QtQml/private/qqmljsast_p.h>
24#include <QtQml/private/qqmljsengine_p.h>
26#include <QtCore/QCborValue>
27#include <QtCore/QCborMap>
28#include <QtCore/QMutexLocker>
29#include <QtCore/QPair>
47 QMap<QString, QCborValue> subValues = {})
52 MockObject
copy()
const;
72 QMap<QString, MockObject> subObjects = {}, QMap<QString, QCborValue> subValues = {},
86 MockOwner(
const Path &pathFromTop,
int derivedFrom, QDateTime dataRefreshedAt,
87 QMap<QString, MockObject> subObjects = {}, QMap<QString, QCborValue> subValues = {})
void updatePathFromOwner(const Path &newPath)
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor visitor) const
Path addAnnotation(const Path &selfPathFromOwner, const QmlObject &annotation, QmlObject **aPtr=nullptr)
BindingValue(const QList< QmlObject > &l)
void updatePathFromOwner(const Path &newPath)
BindingValue(const std::shared_ptr< ScriptExpression > &o)
BindingValue(const BindingValue &o)
DomItem value(const DomItem &binding) const
BindingValue & operator=(const BindingValue &o)
BindingValue(const QmlObject &o)
std::shared_ptr< ScriptExpression > scriptExpressionValue() const
Binding & operator=(const Binding &)
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor) const
Path addAnnotation(const Path &selfPathFromOwner, const QmlObject &a, QmlObject **aPtr=nullptr)
void updatePathFromOwner(const Path &newPath)
QmlObject const * objectValue() const
DomItem valueItem(const DomItem &self) const
QList< QmlObject > * arrayValue()
Binding(const Binding &o)
Binding(const QString &m_name, std::unique_ptr< BindingValue > value, BindingType bindingType=BindingType::Normal)
QList< QmlObject > const * arrayValue() const
void writeOut(const DomItem &self, OutWriter &lw) const
Binding(const QString &m_name, const QString &scriptCode, BindingType bindingType=BindingType::Normal)
bool isSignalHandler() const
void writeOutValue(const DomItem &self, OutWriter &lw) const
Binding(const QString &m_name=QString())
Binding(const QString &m_name, const QmlObject &value, BindingType bindingType=BindingType::Normal)
QmlObject * objectValue()
std::shared_ptr< ScriptExpression > scriptExpressionValue()
BindingValueKind valueKind() const
Binding(const QString &m_name, const std::shared_ptr< ScriptExpression > &value, BindingType bindingType=BindingType::Normal)
void updatePathFromOwner(const Path &newPath) override
Component(const Path &pathFromOwner=Path())
Path addObject(const QmlObject &object, QmlObject **oPtr=nullptr)
Path attachedTypePath(const DomItem &) const
DomItem field(const DomItem &self, QStringView name) const override
bool iterateDirectSubpaths(const DomItem &, DirectVisitor) const override
Component(const QString &name)
virtual void updatePathFromOwner(const Path &newPath)
static ErrorGroup domErrorGroup
DomItem environment() const
Path pathFromOwner() const
DomItem containingObject() const
DomItem path(const Path &p, const ErrorHandler &h=&defaultErrorHandler) const
DomItem subReferenceItem(const PathEls::PathComponent &c, const Path &referencedObject) const
DomItem subMapItem(const Map &map) const
InternalKind internalKind() const
Path canonicalPath() const
void writeOut(OutWriter &lw) const
void writeOutPost(OutWriter &lw) const
void writeOutPre(OutWriter &lw) const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor visitor) const override
void setAnnotations(const QList< QmlObject > &annotations)
void writeOut(const DomItem &self, OutWriter &lw) const override
void updatePathFromOwner(const Path &newP) override
Path addAnnotation(const QmlObject &child, QmlObject **cPtr=nullptr)
void writeOut(const DomItem &self, OutWriter &lw) const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor visitor) const
Represents a set of tags grouping a set of related error messages.
ErrorMessage warning(const Dumper &message) const
ErrorMessage error(const Dumper &message) const
Represents and maintains a mapping between elements and their location in a file.
Path addAnnotation(const Path &selfPathFromOwner, const QmlObject &ann, QmlObject **aPtr=nullptr)
Id(const QString &idName=QString(), const Path &referredObject=Path())
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor) const
void updatePathFromOwner(const Path &pathFromOwner)
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor visitor) const
QList< Path > allSources(const DomItem &self) const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor) const
void writeOut(const DomItem &self, OutWriter &ow) const
void eof(bool ensureNewline=true)
void writeOut(const DomItem &self, OutWriter &ow, bool compact) const
Path typePath(const DomItem &) const
QString postCode(const DomItem &) const
QString preCode(const DomItem &) const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor visitor) const
void writeOut(const DomItem &self, OutWriter &ow) const
QString signature(const DomItem &self) const
void writeOut(const DomItem &self, OutWriter &ow) const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor visitor) const
void writeOutSignal(const DomItem &self, OutWriter &ow) const
TypeAnnotationStyle typeAnnotationStyle
MockObject(const Path &pathFromOwner=Path(), QMap< QString, MockObject > subObjects={}, QMap< QString, QCborValue > subValues={})
QMap< QString, MockObject > subObjects
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor) const override
DomType kind() const override
std::pair< QString, MockObject > asStringPair() const
static constexpr DomType kindValue
QMap< QString, QCborValue > subValues
QMap< QString, MockObject > subObjects
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor) const override
std::shared_ptr< OwningItem > doCopy(const DomItem &self) const override
std::shared_ptr< MockOwner > makeCopy(const DomItem &self) const
MockOwner(const MockOwner &o)
Path canonicalPath(const DomItem &self) const override
static constexpr DomType kindValue
QMap< QString, QMap< QString, MockObject > > subMaps
QMap< QString, QCborValue > subValues
DomType kind() const override
MockOwner(const Path &pathFromTop=Path(), int derivedFrom=0, QMap< QString, MockObject > subObjects={}, QMap< QString, QCborValue > subValues={}, QMap< QString, QMap< QString, MockObject > > subMaps={}, QMap< QString, QMultiMap< QString, MockObject > > subMultiMaps={}, QMap< QString, QList< MockObject > > subLists={})
MutableDomItem path(const Path &p)
OutWriter & ensureNewline(int nNewlines=1)
int increaseIndent(int level=1)
int decreaseIndent(int level=1, int expectedIndent=-1)
OutWriter(LineWriter &lw)
void itemStart(const DomItem &it)
void eof(bool ensureNewline=true)
bool removeTextAddCallback(int i)
void itemEnd(const DomItem &it)
int addNewlinesAutospacerCallback(int nLines)
void addErrorLocal(ErrorMessage &&msg)
OwningItem(int derivedFrom=0)
static Path Root(PathRoot r)
Path operator[](int i) const
void writeOut(const DomItem &self, OutWriter &ow) const
bool isParametricType() const
void writeOut(const DomItem &self, OutWriter &lw) const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor visitor) const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor) const override
QList< DomItem > subComponents(const DomItem &self) const
void updatePathFromOwner(const Path &newPath) override
void writeOut(const DomItem &self, OutWriter &) const override
QList< QString > subComponentsNames(const DomItem &self) const
void writeOut(const DomItem &self, OutWriter &ow, const QString &onTarget) const
MutableDomItem addBinding(MutableDomItem &self, Binding binding, AddOption option)
void updatePathFromOwner(const Path &newPath) override
static constexpr DomType kindValue
void writeOutSortedEnumerations(const DomItem &component, OutWriter &ow) const
LocallyResolvedAlias resolveAlias(const DomItem &self, std::shared_ptr< ScriptExpression > accessSequence) const
void writeOutId(const DomItem &self, OutWriter &ow) const
LocallyResolvedAlias resolveAlias(const DomItem &self, const QStringList &accessSequence) const
virtual bool iterateSubOwners(const DomItem &self, function_ref< bool(const DomItem &owner)> visitor) const
void writeOutSortedPropertyDefinition(const DomItem &self, OutWriter &ow, QSet< QString > &mergedDefBinding) const
Path addPropertyDef(const PropertyDefinition &propertyDef, AddOption option, PropertyDefinition **pDef=nullptr)
Path addBinding(Binding binding, AddOption option, Binding **bPtr=nullptr)
MutableDomItem addPropertyDef(MutableDomItem &self, const PropertyDefinition &propertyDef, AddOption option)
DomItem field(const DomItem &self, QStringView name) const override
QString localDefaultPropertyName() const
QString defaultPropertyName(const DomItem &self) const
QmlObject(const Path &pathFromOwner=Path())
void writeOutSortedAttributes(const DomItem &self, OutWriter &ow, const DomItem &component) const
MutableDomItem addMethod(MutableDomItem &self, const MethodInfo &functionDef, AddOption option)
void writeOutAttributes(const DomItem &self, OutWriter &ow, const DomItem &component, const QString &code) const
Path nextScopePath() const
QList< QPair< SourceLocation, DomItem > > orderOfAttributes(const DomItem &self, const DomItem &component) const
QList< QString > fields() const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor) const override
Path addMethod(const MethodInfo &functionDef, AddOption option, MethodInfo **mPtr=nullptr)
bool iterateBaseDirectSubpaths(const DomItem &self, DirectVisitor) const
QString absoluteLocalPath(const QString &basePath=QString()) const
QUrl directoryUrl() const
QString directoryString() const
QString localPath() const
QString moduleUri() const
bool iterateDirectSubpaths(const DomItem &, DirectVisitor) const override
Use this to contain any script element.
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor visitor) const override
ScriptExpression(const ScriptExpression &e)
void writeOut(const DomItem &self, OutWriter &lw) const override
SourceLocation globalLocation(const DomItem &self) const
QString astRelocatableDump() const
void setScriptElement(const ScriptElementVariant &p)
void astDumper(const Sink &s, AstDumperOptions options) const
ScriptExpression(QStringView code, const std::shared_ptr< QQmlJS::Engine > &engine, AST::Node *ast, const std::shared_ptr< AstComments > &comments, ExpressionType expressionType, SourceLocation localOffset=SourceLocation(), int derivedFrom=0, QStringView preCode=QStringView(), QStringView postCode=QStringView())
std::shared_ptr< ScriptExpression > copyWithUpdatedCode(const DomItem &self, const QString &code) const
bool iterateDirectSubpaths(const DomItem &self, DirectVisitor) const
Version(qint32 majorVersion=Undefined, qint32 minorVersion=Undefined)
QString stringValue() const
A vistor that visits all the AST:Node.
Path moduleIndexPath(const QString &uri, int majorVersion, const ErrorHandler &errorHandler=nullptr)
Path moduleScopePath(const QString &uri, const QString &version, const ErrorHandler &errorHandler=nullptr)
Path moduleScopePath(const QString &uri, Version version, const ErrorHandler &errorHandler=nullptr)
static ErrorGroups domParsingErrors()
Combined button and popup list for selecting options.
#define NewErrorGroup(name)