diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-03-31 15:46:20 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-04-01 10:29:29 +0200 |
commit | eb5aa8d9c18535ecd0aacc42fe3af954faf01c04 (patch) | |
tree | ee76e6358c9ae18fcdce6a6ae4fead3173ea6780 /tools/qmllint/checkidentifiers.h | |
parent | a88e5c1711bbef1af00ca9a9e0db71b8a24223aa (diff) |
qmllint: Consistently use shared pointers for ScopeTree
ScopeTree keeps a weak pointer to its parent scope and strong shared
pointers to its children. Avoid passing bare pointers around, so that we
cannot create multiple shared pointers independently from the same bare
pointer.
Change-Id: Id0faece550b1878363004d843a8fa5c1164794ae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint/checkidentifiers.h')
-rw-r--r-- | tools/qmllint/checkidentifiers.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/qmllint/checkidentifiers.h b/tools/qmllint/checkidentifiers.h index ae924c491c..5d2236b7f9 100644 --- a/tools/qmllint/checkidentifiers.h +++ b/tools/qmllint/checkidentifiers.h @@ -41,12 +41,12 @@ public: m_colorOut(colorOut), m_code(code), m_types(types) {} - bool operator ()(const QHash<QString, const ScopeTree *> &qmlIDs, - const ScopeTree *root, const QString &rootId) const; + bool operator ()(const QHash<QString, ScopeTree::ConstPtr> &qmlIDs, + const ScopeTree::ConstPtr &root, const QString &rootId) const; private: bool checkMemberAccess(const QVector<ScopeTree::FieldMember> &members, - const ScopeTree *scope) const; + const ScopeTree::ConstPtr &outerScope) const; void printContext(const QQmlJS::SourceLocation &location) const; ColorOutput *m_colorOut = nullptr; |