diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2020-02-28 13:57:16 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2020-03-02 11:02:35 +0100 |
commit | 281a2dc91e96ffc833f85faf05c73eddc5bac645 (patch) | |
tree | ce88cb69bdc68072e9b4375f12cf62577cbcb89e /src/qdoc/qmlvisitor.h | |
parent | faf3ced146b50e3eb8b20a3d02711c29f9484106 (diff) |
Prepare for internal QML Parser API change
With the internal API version 8, the SourceLocation will move from
QQmlJS::AST to the QQmlJS namespace, and it will get its
loc.startLine/loc.startColumn members back.
Change-Id: I70ba5a7f7b6eca60298a7b4982bf2cf099110089
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qdoc/qmlvisitor.h')
-rw-r--r-- | src/qdoc/qmlvisitor.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/qdoc/qmlvisitor.h b/src/qdoc/qmlvisitor.h index 6c10c5258..c0fe51251 100644 --- a/src/qdoc/qmlvisitor.h +++ b/src/qdoc/qmlvisitor.h @@ -40,6 +40,15 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_DECLARATIVE +# include <private/qqmlapiversion_p.h> +# if Q_QML_PRIVATE_API_VERSION < 8 +namespace QQmlJS { + using SourceLocation = AST::SourceLocation; +} +# endif +#endif + struct QmlPropArgs { QString type_; @@ -96,9 +105,9 @@ public: private: QString getFullyQualifiedId(QQmlJS::AST::UiQualifiedId *id); - QQmlJS::AST::SourceLocation precedingComment(quint32 offset) const; - bool applyDocumentation(QQmlJS::AST::SourceLocation location, Node *node); - void applyMetacommands(QQmlJS::AST::SourceLocation location, Node *node, Doc &doc); + QQmlJS::SourceLocation precedingComment(quint32 offset) const; + bool applyDocumentation(QQmlJS::SourceLocation location, Node *node); + void applyMetacommands(QQmlJS::SourceLocation location, Node *node, Doc &doc); bool splitQmlPropertyArg(const Doc &doc, const QString &arg, QmlPropArgs &qpa); QQmlJS::Engine *engine; |