Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmltctyperesolver_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 GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant
4
5#ifndef QQMLTCTYPERESOLVER_P_H
6#define QQMLTCTYPERESOLVER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qqmltcvisitor_p.h>
20
21#include <QtQml/private/qqmlirbuilder_p.h>
22#include <private/qqmljstyperesolver_p.h>
23#include <private/qqmljsimporter_p.h>
24#include <private/qqmljslogger_p.h>
25
26QT_BEGIN_NAMESPACE
27
28namespace QQmltc {
29
31{
32public:
34 {
35 Q_ASSERT(importer);
36 }
37
38 void init(Visitor *visitor, QQmlJS::AST::Node *program);
39
40 QQmlJSScope::Ptr scopeForLocation(const QV4::CompiledData::Location &location) const;
41
42 // returns an import pair {url, modifiable type} for a given \a type
43 std::pair<QString, QQmlJSScope::Ptr> importedType(const QQmlJSScope::ConstPtr &type) const;
44
45private:
46 QQmlJSImporter *m_importer = nullptr;
47
48 QHash<QV4::CompiledData::Location, QQmlJSScope::Ptr> m_objectsByLocationNonConst;
49 QQmlJSScope::Ptr m_root;
50};
51
52} // namespace QQmltc
53
54QT_END_NAMESPACE
55
56#endif // QQMLTCTYPERESOLVER_P_H
std::pair< QString, QQmlJSScope::Ptr > importedType(const QQmlJSScope::ConstPtr &type) const
TypeResolver(QQmlJSImporter *importer)
QQmlJSScope::Ptr scopeForLocation(const QV4::CompiledData::Location &location) const
void init(Visitor *visitor, QQmlJS::AST::Node *program)
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)