diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-02 14:33:08 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-05 14:59:20 +0200 |
commit | 6bb5a51a9d70347f50c89919613a958c1a524ab5 (patch) | |
tree | 433a09406ccb2ea682a28a8f9ab75d7402e7fb9c /src/qmlcompiler | |
parent | 770aa2aa73303063e21ae2053ce1b37a0673344e (diff) |
QmlCompiler: Wrap into Qt namespace
As a Qt module, QmlCompiler's classes should live in the Qt namespace.
Change-Id: I3138812c288979fe7cff316dd9b63213bd6dfd05
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler')
-rw-r--r-- | src/qmlcompiler/qqmljsimportedmembersvisitor.cpp | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsimportedmembersvisitor_p.h | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsimporter.cpp | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsimporter_p.h | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsmetatypes_p.h | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsresourcefilemapper.cpp | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsresourcefilemapper_p.h | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsscope.cpp | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsscope_p.h | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsstreamwriter.cpp | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsstreamwriter_p.h | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljstypedescriptionreader.cpp | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljstypedescriptionreader_p.h | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljstypereader.cpp | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljstypereader_p.h | 4 |
15 files changed, 60 insertions, 0 deletions
diff --git a/src/qmlcompiler/qqmljsimportedmembersvisitor.cpp b/src/qmlcompiler/qqmljsimportedmembersvisitor.cpp index 3e828f87fb..3a78073f4e 100644 --- a/src/qmlcompiler/qqmljsimportedmembersvisitor.cpp +++ b/src/qmlcompiler/qqmljsimportedmembersvisitor.cpp @@ -28,6 +28,8 @@ #include "qqmljsimportedmembersvisitor_p.h" +QT_BEGIN_NAMESPACE + using namespace QQmlJS::AST; QQmlJSScope::Ptr QQmlJSImportedMembersVisitor::result(const QString &scopeName) const @@ -167,3 +169,5 @@ void QQmlJSImportedMembersVisitor::throwRecursionDepthError() { m_errors.append(QStringLiteral("Maximum statement or expression depth exceeded")); } + +QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljsimportedmembersvisitor_p.h b/src/qmlcompiler/qqmljsimportedmembersvisitor_p.h index 15805fd82b..ae1804cadb 100644 --- a/src/qmlcompiler/qqmljsimportedmembersvisitor_p.h +++ b/src/qmlcompiler/qqmljsimportedmembersvisitor_p.h @@ -43,6 +43,8 @@ #include <private/qqmljsast_p.h> +QT_BEGIN_NAMESPACE + class QQmlJSImportedMembersVisitor : public QQmlJS::AST::Visitor { public: @@ -67,4 +69,6 @@ private: QStringList m_errors; }; +QT_END_NAMESPACE + #endif // QQMLJSIMPORTEDMEMBERSVISITOR_P_H diff --git a/src/qmlcompiler/qqmljsimporter.cpp b/src/qmlcompiler/qqmljsimporter.cpp index 02d32b4bcb..5caccd36cb 100644 --- a/src/qmlcompiler/qqmljsimporter.cpp +++ b/src/qmlcompiler/qqmljsimporter.cpp @@ -35,6 +35,8 @@ #include <QtCore/qfileinfo.h> #include <QtCore/qdiriterator.h> +QT_BEGIN_NAMESPACE + static const QLatin1String SlashQmldir = QLatin1String("/qmldir"); static const QLatin1String SlashPluginsDotQmltypes = QLatin1String("/plugins.qmltypes"); @@ -289,3 +291,5 @@ QQmlJSImporter::ImportedTypes QQmlJSImporter::importFileOrDirectory( return result.qmlNames; } + +QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljsimporter_p.h b/src/qmlcompiler/qqmljsimporter_p.h index f13724b9cf..43bc0296b8 100644 --- a/src/qmlcompiler/qqmljsimporter_p.h +++ b/src/qmlcompiler/qqmljsimporter_p.h @@ -42,6 +42,8 @@ #include "qqmljsscope_p.h" #include <QtQml/private/qqmldirparser_p.h> +QT_BEGIN_NAMESPACE + class QQmlJSImporter { public: @@ -100,4 +102,6 @@ private: QStringList m_warnings; }; +QT_END_NAMESPACE + #endif // QQMLJSIMPORTER_P_H diff --git a/src/qmlcompiler/qqmljsmetatypes_p.h b/src/qmlcompiler/qqmljsmetatypes_p.h index fdd93ed71a..8d63c7151a 100644 --- a/src/qmlcompiler/qqmljsmetatypes_p.h +++ b/src/qmlcompiler/qqmljsmetatypes_p.h @@ -53,6 +53,8 @@ // The parent of an Item, for example, is typically not just a QtObject, but rather // some other Item with custom properties. +QT_BEGIN_NAMESPACE + class QQmlJSScope; class QQmlJSMetaEnum { @@ -197,4 +199,6 @@ public: int revision() const { return m_revision; } }; +QT_END_NAMESPACE + #endif // QQMLJSMETATYPES_P_H diff --git a/src/qmlcompiler/qqmljsresourcefilemapper.cpp b/src/qmlcompiler/qqmljsresourcefilemapper.cpp index 782ad83c43..a31aeb29e5 100644 --- a/src/qmlcompiler/qqmljsresourcefilemapper.cpp +++ b/src/qmlcompiler/qqmljsresourcefilemapper.cpp @@ -32,6 +32,8 @@ #include <QDir> #include <QXmlStreamReader> +QT_BEGIN_NAMESPACE + QQmlJSResourceFileMapper::QQmlJSResourceFileMapper(const QStringList &resourceFiles) { for (const QString &fileName: resourceFiles) { @@ -168,3 +170,5 @@ void QQmlJSResourceFileMapper::populateFromQrcFile(QFile &file) } } } + +QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljsresourcefilemapper_p.h b/src/qmlcompiler/qqmljsresourcefilemapper_p.h index 50f19fb38a..2946075387 100644 --- a/src/qmlcompiler/qqmljsresourcefilemapper_p.h +++ b/src/qmlcompiler/qqmljsresourcefilemapper_p.h @@ -42,6 +42,8 @@ #include <QHash> #include <QFile> +QT_BEGIN_NAMESPACE + struct QQmlJSResourceFileMapper { enum class FileOutput { @@ -61,4 +63,6 @@ private: QHash<QString, QString> qrcPathToFileSystemPath; }; +QT_END_NAMESPACE + #endif // QMLJSRESOURCEFILEMAPPER_P_H diff --git a/src/qmlcompiler/qqmljsscope.cpp b/src/qmlcompiler/qqmljsscope.cpp index 6f02070b71..8087880f66 100644 --- a/src/qmlcompiler/qqmljsscope.cpp +++ b/src/qmlcompiler/qqmljsscope.cpp @@ -33,6 +33,8 @@ #include <algorithm> +QT_BEGIN_NAMESPACE + QQmlJSScope::QQmlJSScope(ScopeType type, const QQmlJSScope::Ptr &parentScope) : m_parentScope(parentScope), m_scopeType(type) {} @@ -179,3 +181,5 @@ bool QQmlJSScope::Export::isValid() const { return m_version.isValid() || !m_package.isEmpty() || !m_type.isEmpty(); } + +QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h index 3fb501f976..9e0cfcd079 100644 --- a/src/qmlcompiler/qqmljsscope_p.h +++ b/src/qmlcompiler/qqmljsscope_p.h @@ -50,6 +50,8 @@ #include <optional> +QT_BEGIN_NAMESPACE + enum class ScopeType { JSFunctionScope, @@ -218,4 +220,6 @@ private: AccessSemantics m_semantics = AccessSemantics::Reference; }; +QT_END_NAMESPACE + #endif // QQMLJSSCOPE_P_H diff --git a/src/qmlcompiler/qqmljsstreamwriter.cpp b/src/qmlcompiler/qqmljsstreamwriter.cpp index eb11eaa2ae..503485e4f9 100644 --- a/src/qmlcompiler/qqmljsstreamwriter.cpp +++ b/src/qmlcompiler/qqmljsstreamwriter.cpp @@ -31,6 +31,8 @@ #include <QtCore/QBuffer> #include <QtCore/QStringList> +QT_BEGIN_NAMESPACE + QQmlJSStreamWriter::QQmlJSStreamWriter(QByteArray *array) : m_indentDepth(0) , m_pendingLineLength(0) @@ -188,3 +190,5 @@ void QQmlJSStreamWriter::flushPotentialLinesWithNewlines() m_pendingLineLength = 0; m_maybeOneline = false; } + +QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljsstreamwriter_p.h b/src/qmlcompiler/qqmljsstreamwriter_p.h index b6a71775f0..811eba9bfc 100644 --- a/src/qmlcompiler/qqmljsstreamwriter_p.h +++ b/src/qmlcompiler/qqmljsstreamwriter_p.h @@ -45,6 +45,8 @@ #include <QtCore/QScopedPointer> #include <QtCore/QPair> +QT_BEGIN_NAMESPACE + class QQmlJSStreamWriter { public: @@ -74,4 +76,6 @@ private: QScopedPointer<QIODevice> m_stream; }; +QT_END_NAMESPACE + #endif // QQMLJSSTREAMWRITER_P_H diff --git a/src/qmlcompiler/qqmljstypedescriptionreader.cpp b/src/qmlcompiler/qqmljstypedescriptionreader.cpp index a58c3120fb..3d3084a724 100644 --- a/src/qmlcompiler/qqmljstypedescriptionreader.cpp +++ b/src/qmlcompiler/qqmljstypedescriptionreader.cpp @@ -34,6 +34,8 @@ #include <QtCore/qdir.h> +QT_BEGIN_NAMESPACE + using namespace QQmlJS; using namespace QQmlJS::AST; @@ -687,3 +689,5 @@ void QQmlJSTypeDescriptionReader::readEnumValues(UiScriptBinding *ast, QQmlJSMet tr("Expected either array or object literal as enum definition.")); } } + +QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljstypedescriptionreader_p.h b/src/qmlcompiler/qqmljstypedescriptionreader_p.h index 8619d4bde2..770a53f01d 100644 --- a/src/qmlcompiler/qqmljstypedescriptionreader_p.h +++ b/src/qmlcompiler/qqmljstypedescriptionreader_p.h @@ -46,6 +46,8 @@ // for Q_DECLARE_TR_FUNCTIONS #include <QtCore/qcoreapplication.h> +QT_BEGIN_NAMESPACE + class QQmlJSTypeDescriptionReader { Q_DECLARE_TR_FUNCTIONS(QQmlJSTypeDescriptionReader) @@ -92,4 +94,6 @@ private: QStringList *m_dependencies = nullptr; }; +QT_END_NAMESPACE + #endif // QQMLJSTYPEDESCRIPTIONREADER_P_H diff --git a/src/qmlcompiler/qqmljstypereader.cpp b/src/qmlcompiler/qqmljstypereader.cpp index 5f95babb9b..0974e16050 100644 --- a/src/qmlcompiler/qqmljstypereader.cpp +++ b/src/qmlcompiler/qqmljstypereader.cpp @@ -38,6 +38,8 @@ #include <QtCore/qfileinfo.h> #include <QtCore/qdebug.h> +QT_BEGIN_NAMESPACE + static QList<QQmlJSTypeReader::Import> parseHeaders(QQmlJS::AST::UiHeaderItemList *header) { using namespace QQmlJS::AST; @@ -134,3 +136,5 @@ QQmlJSScope::Ptr QQmlJSTypeReader::operator()() // TODO: Anything special to do with ES modules here? return parseProgram(QQmlJS::AST::cast<QQmlJS::AST::Program *>(parser.rootNode()), scopeName); } + +QT_END_NAMESPACE diff --git a/src/qmlcompiler/qqmljstypereader_p.h b/src/qmlcompiler/qqmljstypereader_p.h index efff9a8997..0ac4571c95 100644 --- a/src/qmlcompiler/qqmljstypereader_p.h +++ b/src/qmlcompiler/qqmljstypereader_p.h @@ -46,6 +46,8 @@ #include <QtCore/qpair.h> #include <QtCore/qset.h> +QT_BEGIN_NAMESPACE + class QQmlJSTypeReader { public: @@ -67,4 +69,6 @@ private: QStringList m_errors; }; +QT_END_NAMESPACE + #endif // QQMLJSTYPEREADER_P_H |