aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljstypedescriptionreader_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler/qqmljstypedescriptionreader_p.h')
-rw-r--r--src/qmlcompiler/qqmljstypedescriptionreader_p.h50
1 files changed, 16 insertions, 34 deletions
diff --git a/src/qmlcompiler/qqmljstypedescriptionreader_p.h b/src/qmlcompiler/qqmljstypedescriptionreader_p.h
index f99cda0605..2bbae61fd6 100644
--- a/src/qmlcompiler/qqmljstypedescriptionreader_p.h
+++ b/src/qmlcompiler/qqmljstypedescriptionreader_p.h
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the tools applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef QQMLJSTYPEDESCRIPTIONREADER_P_H
#define QQMLJSTYPEDESCRIPTIONREADER_P_H
+#include <qtqmlcompilerexports.h>
+
//
// W A R N I N G
// -------------
@@ -48,7 +25,7 @@
QT_BEGIN_NAMESPACE
-class QQmlJSTypeDescriptionReader
+class Q_QMLCOMPILER_EXPORT QQmlJSTypeDescriptionReader
{
Q_DECLARE_TR_FUNCTIONS(QQmlJSTypeDescriptionReader)
public:
@@ -56,9 +33,7 @@ public:
explicit QQmlJSTypeDescriptionReader(QString fileName, QString data)
: m_fileName(std::move(fileName)), m_source(std::move(data)) {}
- bool operator()(
- QHash<QString, QQmlJSScope::Ptr> *objects,
- QStringList *dependencies);
+ bool operator()(QList<QQmlJSExportedScope> *objects, QStringList *dependencies);
QString errorMessage() const { return m_errorMessage; }
QString warningMessage() const { return m_warningMessage; }
@@ -79,9 +54,15 @@ private:
double readNumericBinding(QQmlJS::AST::UiScriptBinding *ast);
QTypeRevision readNumericVersionBinding(QQmlJS::AST::UiScriptBinding *ast);
int readIntBinding(QQmlJS::AST::UiScriptBinding *ast);
- void readExports(QQmlJS::AST::UiScriptBinding *ast, const QQmlJSScope::Ptr &scope);
+ QList<QQmlJSScope::Export> readExports(QQmlJS::AST::UiScriptBinding *ast);
+ void readAliases(QQmlJS::AST::UiScriptBinding *ast, const QQmlJSScope::Ptr &scope);
void readInterfaces(QQmlJS::AST::UiScriptBinding *ast, const QQmlJSScope::Ptr &scope);
- void readMetaObjectRevisions(QQmlJS::AST::UiScriptBinding *ast, const QQmlJSScope::Ptr &scope);
+ void checkMetaObjectRevisions(
+ QQmlJS::AST::UiScriptBinding *ast, QList<QQmlJSScope::Export> *exports);
+
+ QStringList readStringList(QQmlJS::AST::UiScriptBinding *ast);
+ void readDeferredNames(QQmlJS::AST::UiScriptBinding *ast, const QQmlJSScope::Ptr &scope);
+ void readImmediateNames(QQmlJS::AST::UiScriptBinding *ast, const QQmlJSScope::Ptr &scope);
void readEnumValues(QQmlJS::AST::UiScriptBinding *ast, QQmlJSMetaEnum *metaEnum);
void addError(const QQmlJS::SourceLocation &loc, const QString &message);
@@ -93,8 +74,9 @@ private:
QString m_source;
QString m_errorMessage;
QString m_warningMessage;
- QHash<QString, QQmlJSScope::Ptr> *m_objects = nullptr;
+ QList<QQmlJSExportedScope> *m_objects = nullptr;
QStringList *m_dependencies = nullptr;
+ int m_currentCtorIndex = 0;
};
QT_END_NAMESPACE