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
qqmldomtypesreader_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 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 QQMLDOMTYPESREADER_H
5#define QQMLDOMTYPESREADER_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
18
19#include <QtQml/private/qqmljsastfwd_p.h>
20
21// for Q_DECLARE_TR_FUNCTIONS
22#include <QtCore/qcoreapplication.h>
23#include <private/qqmljsmetatypes_p.h>
24#include <private/qqmljsscope_p.h>
25
27
28namespace QQmlJS {
29namespace Dom {
30
32{
33 Q_DECLARE_TR_FUNCTIONS(TypeDescriptionReader)
34public:
35 explicit QmltypesReader(const DomItem &qmltypesFile)
36 : m_qmltypesFilePtr(qmltypesFile.ownerAs<QmltypesFile>()), m_qmltypesFile(qmltypesFile)
37 {
38 }
39
40 bool parse();
41 // static void read
42private:
43 void addError(ErrorMessage &&message);
44
45 void insertProperty(const QQmlJSScope::ConstPtr &jsScope, const QQmlJSMetaProperty &property,
46 QMap<int, QmlObject> &objs);
47 void insertSignalOrMethod(const QQmlJSMetaMethod &metaMethod, QMap<int, QmlObject> &objs);
48 void insertComponent(const QQmlJSScope::ConstPtr &jsScope,
49 const QList<QQmlJSScope::Export> &exportsList);
50 EnumDecl enumFromMetaEnum(const QQmlJSMetaEnum &metaEnum);
51
52 std::shared_ptr<QmltypesFile> qmltypesFilePtr() { return m_qmltypesFilePtr; }
53 DomItem &qmltypesFile() { return m_qmltypesFile; }
54 ErrorHandler handler()
55 {
56 return [this](const ErrorMessage &m) { this->addError(ErrorMessage(m)); };
57 }
58
59private:
60 std::shared_ptr<QmltypesFile> m_qmltypesFilePtr;
61 DomItem m_qmltypesFile;
62 Path m_currentPath;
63};
64
65} // end namespace Dom
66} // end namespace QQmlJS
68#endif // QQMLDOMTYPESREADER_H
Represents an error message connected to the dom.
QmltypesReader(const DomItem &qmltypesFile)
std::function< void(const ErrorMessage &)> ErrorHandler
Combined button and popup list for selecting options.
#define Q_DECLARE_TR_FUNCTIONS(context)
const GLfloat * m
GLuint GLsizei const GLchar * message
const char property[13]
Definition qwizard.cpp:101