diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-02 14:21:42 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-05 14:59:14 +0200 |
commit | 770aa2aa73303063e21ae2053ce1b37a0673344e (patch) | |
tree | c9cea51a2aa4e0fc2b1ea929497dfb72f8d753ea | |
parent | 4c1a1cc458d1addabea90f48d36998d7b3253fc2 (diff) |
QmlCompiler: Rename TypeDescriptionReader
The names should begin with a common prefix.
Change-Id: Ibd832ebe7a778c7af8ee3b75253e04491ded28be
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | src/qmlcompiler/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/qmlcompiler/qmlcompiler.pro | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsimporter.cpp | 4 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljstypedescriptionreader.cpp (renamed from src/qmlcompiler/typedescriptionreader.cpp) | 40 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljstypedescriptionreader_p.h (renamed from src/qmlcompiler/typedescriptionreader_p.h) | 14 | ||||
-rw-r--r-- | tools/qmllint/findwarnings.cpp | 2 | ||||
-rw-r--r-- | tools/qmllint/findwarnings.h | 2 |
7 files changed, 34 insertions, 34 deletions
diff --git a/src/qmlcompiler/CMakeLists.txt b/src/qmlcompiler/CMakeLists.txt index b6eea0ff01..396d9c2ea2 100644 --- a/src/qmlcompiler/CMakeLists.txt +++ b/src/qmlcompiler/CMakeLists.txt @@ -14,8 +14,8 @@ qt_add_module(QmlCompiler qqmljsresourcefilemapper.cpp qqmljsresourcefilemapper_p.h qqmljsscope.cpp qqmljsscope_p.h qqmljsstreamwriter.cpp qqmljsstreamwriter_p.h + qqmljstypedescriptionreader.cpp qqmljstypedescriptionreader_p.h qqmljstypereader.cpp qqmljstypereader_p.h - typedescriptionreader.cpp typedescriptionreader_p.h PUBLIC_LIBRARIES Qt::CorePrivate Qt::QmlDevToolsPrivate diff --git a/src/qmlcompiler/qmlcompiler.pro b/src/qmlcompiler/qmlcompiler.pro index 94b3f90ee1..fa280dcd8e 100644 --- a/src/qmlcompiler/qmlcompiler.pro +++ b/src/qmlcompiler/qmlcompiler.pro @@ -9,7 +9,7 @@ SOURCES = \ qqmljsimporter.cpp \ qqmljstypereader.cpp \ qqmljsscope.cpp \ - typedescriptionreader.cpp \ + qqmljstypedescriptionreader.cpp \ qqmljsstreamwriter.cpp HEADERS = \ @@ -19,7 +19,7 @@ HEADERS = \ qqmljstypereader_p.h \ qqmljsmetatypes_p.h \ qqmljsscope_p.h \ - typedescriptionreader_p.h \ + qqmljstypedescriptionreader_p.h \ qqmljsstreamwriter_p.h load(qt_module) diff --git a/src/qmlcompiler/qqmljsimporter.cpp b/src/qmlcompiler/qqmljsimporter.cpp index d954d48420..02d32b4bcb 100644 --- a/src/qmlcompiler/qqmljsimporter.cpp +++ b/src/qmlcompiler/qqmljsimporter.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ #include "qqmljsimporter_p.h" -#include "typedescriptionreader_p.h" +#include "qqmljstypedescriptionreader_p.h" #include "qqmljstypereader_p.h" #include <QtQml/private/qqmlimportresolver_p.h> @@ -69,7 +69,7 @@ void QQmlJSImporter::readQmltypes( QFile file(filename); file.open(QFile::ReadOnly); - TypeDescriptionReader reader { filename, QString::fromUtf8(file.readAll()) }; + QQmlJSTypeDescriptionReader reader { filename, QString::fromUtf8(file.readAll()) }; QStringList dependencies; auto succ = reader(objects, &dependencies); if (!succ) diff --git a/src/qmlcompiler/typedescriptionreader.cpp b/src/qmlcompiler/qqmljstypedescriptionreader.cpp index 4c7d655385..a58c3120fb 100644 --- a/src/qmlcompiler/typedescriptionreader.cpp +++ b/src/qmlcompiler/qqmljstypedescriptionreader.cpp @@ -26,7 +26,7 @@ ** ****************************************************************************/ -#include "typedescriptionreader_p.h" +#include "qqmljstypedescriptionreader_p.h" #include <QtQml/private/qqmljsparser_p.h> #include <QtQml/private/qqmljslexer_p.h> @@ -51,7 +51,7 @@ QString toString(const UiQualifiedId *qualifiedId, QChar delimiter = QLatin1Char return result; } -bool TypeDescriptionReader::operator()( +bool QQmlJSTypeDescriptionReader::operator()( QHash<QString, QQmlJSScope::Ptr> *objects, QStringList *dependencies) { @@ -77,7 +77,7 @@ bool TypeDescriptionReader::operator()( return m_errorMessage.isEmpty(); } -void TypeDescriptionReader::readDocument(UiProgram *ast) +void QQmlJSTypeDescriptionReader::readDocument(UiProgram *ast) { if (!ast) { addError(SourceLocation(), tr("Could not parse document.")); @@ -125,7 +125,7 @@ void TypeDescriptionReader::readDocument(UiProgram *ast) readModule(module); } -void TypeDescriptionReader::readModule(UiObjectDefinition *ast) +void QQmlJSTypeDescriptionReader::readModule(UiObjectDefinition *ast) { for (UiObjectMemberList *it = ast->initializer->members; it; it = it->next) { UiObjectMember *member = it->member; @@ -150,7 +150,7 @@ void TypeDescriptionReader::readModule(UiObjectDefinition *ast) } } -void TypeDescriptionReader::addError(const SourceLocation &loc, const QString &message) +void QQmlJSTypeDescriptionReader::addError(const SourceLocation &loc, const QString &message) { m_errorMessage += QString::fromLatin1("%1:%2:%3: %4\n").arg( QDir::toNativeSeparators(m_fileName), @@ -159,7 +159,7 @@ void TypeDescriptionReader::addError(const SourceLocation &loc, const QString &m message); } -void TypeDescriptionReader::addWarning(const SourceLocation &loc, const QString &message) +void QQmlJSTypeDescriptionReader::addWarning(const SourceLocation &loc, const QString &message) { m_warningMessage += QString::fromLatin1("%1:%2:%3: %4\n").arg( QDir::toNativeSeparators(m_fileName), @@ -168,7 +168,7 @@ void TypeDescriptionReader::addWarning(const SourceLocation &loc, const QString message); } -void TypeDescriptionReader::readDependencies(UiScriptBinding *ast) +void QQmlJSTypeDescriptionReader::readDependencies(UiScriptBinding *ast) { auto *stmt = cast<ExpressionStatement*>(ast->statement); if (!stmt) { @@ -186,7 +186,7 @@ void TypeDescriptionReader::readDependencies(UiScriptBinding *ast) } } -void TypeDescriptionReader::readComponent(UiObjectDefinition *ast) +void QQmlJSTypeDescriptionReader::readComponent(UiObjectDefinition *ast) { QQmlJSScope::Ptr scope = QQmlJSScope::create(); @@ -260,7 +260,7 @@ void TypeDescriptionReader::readComponent(UiObjectDefinition *ast) m_objects->insert(scope->internalName(), scope); } -void TypeDescriptionReader::readSignalOrMethod(UiObjectDefinition *ast, bool isMethod, +void QQmlJSTypeDescriptionReader::readSignalOrMethod(UiObjectDefinition *ast, bool isMethod, const QQmlJSScope::Ptr &scope) { QQmlJSMetaMethod metaMethod; @@ -309,7 +309,7 @@ void TypeDescriptionReader::readSignalOrMethod(UiObjectDefinition *ast, bool isM scope->addMethod(metaMethod); } -void TypeDescriptionReader::readProperty(UiObjectDefinition *ast, const QQmlJSScope::Ptr &scope) +void QQmlJSTypeDescriptionReader::readProperty(UiObjectDefinition *ast, const QQmlJSScope::Ptr &scope) { QString name; QString type; @@ -355,7 +355,7 @@ void TypeDescriptionReader::readProperty(UiObjectDefinition *ast, const QQmlJSSc scope->addProperty(QQmlJSMetaProperty(name, type, isList, !isReadonly, isPointer, false, revision)); } -void TypeDescriptionReader::readEnum(UiObjectDefinition *ast, const QQmlJSScope::Ptr &scope) +void QQmlJSTypeDescriptionReader::readEnum(UiObjectDefinition *ast, const QQmlJSScope::Ptr &scope) { QQmlJSMetaEnum metaEnum; @@ -385,7 +385,7 @@ void TypeDescriptionReader::readEnum(UiObjectDefinition *ast, const QQmlJSScope: scope->addEnum(metaEnum); } -void TypeDescriptionReader::readParameter(UiObjectDefinition *ast, QQmlJSMetaMethod *metaMethod) +void QQmlJSTypeDescriptionReader::readParameter(UiObjectDefinition *ast, QQmlJSMetaMethod *metaMethod) { QString name; QString type; @@ -418,7 +418,7 @@ void TypeDescriptionReader::readParameter(UiObjectDefinition *ast, QQmlJSMetaMet metaMethod->addParameter(name, type); } -QString TypeDescriptionReader::readStringBinding(UiScriptBinding *ast) +QString QQmlJSTypeDescriptionReader::readStringBinding(UiScriptBinding *ast) { Q_ASSERT(ast); @@ -442,7 +442,7 @@ QString TypeDescriptionReader::readStringBinding(UiScriptBinding *ast) return stringLit->value.toString(); } -bool TypeDescriptionReader::readBoolBinding(UiScriptBinding *ast) +bool QQmlJSTypeDescriptionReader::readBoolBinding(UiScriptBinding *ast) { Q_ASSERT(ast); @@ -467,7 +467,7 @@ bool TypeDescriptionReader::readBoolBinding(UiScriptBinding *ast) return trueLit; } -double TypeDescriptionReader::readNumericBinding(UiScriptBinding *ast) +double QQmlJSTypeDescriptionReader::readNumericBinding(UiScriptBinding *ast) { Q_ASSERT(ast); @@ -507,7 +507,7 @@ static QTypeRevision parseVersion(const QString &versionString) return QTypeRevision::fromVersion(maybeMajor, maybeMinor); } -QTypeRevision TypeDescriptionReader::readNumericVersionBinding(UiScriptBinding *ast) +QTypeRevision QQmlJSTypeDescriptionReader::readNumericVersionBinding(UiScriptBinding *ast) { QTypeRevision invalidVersion; @@ -534,7 +534,7 @@ QTypeRevision TypeDescriptionReader::readNumericVersionBinding(UiScriptBinding * numericLit->literalToken.length)); } -int TypeDescriptionReader::readIntBinding(UiScriptBinding *ast) +int QQmlJSTypeDescriptionReader::readIntBinding(UiScriptBinding *ast) { double v = readNumericBinding(ast); int i = static_cast<int>(v); @@ -547,7 +547,7 @@ int TypeDescriptionReader::readIntBinding(UiScriptBinding *ast) return i; } -void TypeDescriptionReader::readExports(UiScriptBinding *ast, const QQmlJSScope::Ptr &scope) +void QQmlJSTypeDescriptionReader::readExports(UiScriptBinding *ast, const QQmlJSScope::Ptr &scope) { Q_ASSERT(ast); @@ -597,7 +597,7 @@ void TypeDescriptionReader::readExports(UiScriptBinding *ast, const QQmlJSScope: } } -void TypeDescriptionReader::readMetaObjectRevisions(UiScriptBinding *ast, +void QQmlJSTypeDescriptionReader::readMetaObjectRevisions(UiScriptBinding *ast, const QQmlJSScope::Ptr &scope) { Q_ASSERT(ast); @@ -647,7 +647,7 @@ void TypeDescriptionReader::readMetaObjectRevisions(UiScriptBinding *ast, } } -void TypeDescriptionReader::readEnumValues(UiScriptBinding *ast, QQmlJSMetaEnum *metaEnum) +void QQmlJSTypeDescriptionReader::readEnumValues(UiScriptBinding *ast, QQmlJSMetaEnum *metaEnum) { if (!ast) return; diff --git a/src/qmlcompiler/typedescriptionreader_p.h b/src/qmlcompiler/qqmljstypedescriptionreader_p.h index f2f80d9d01..8619d4bde2 100644 --- a/src/qmlcompiler/typedescriptionreader_p.h +++ b/src/qmlcompiler/qqmljstypedescriptionreader_p.h @@ -26,8 +26,8 @@ ** ****************************************************************************/ -#ifndef TYPEDESCRIPTIONREADER_H -#define TYPEDESCRIPTIONREADER_H +#ifndef QQMLJSTYPEDESCRIPTIONREADER_P_H +#define QQMLJSTYPEDESCRIPTIONREADER_P_H // // W A R N I N G @@ -46,12 +46,12 @@ // for Q_DECLARE_TR_FUNCTIONS #include <QtCore/qcoreapplication.h> -class TypeDescriptionReader +class QQmlJSTypeDescriptionReader { - Q_DECLARE_TR_FUNCTIONS(TypeDescriptionReader) + Q_DECLARE_TR_FUNCTIONS(QQmlJSTypeDescriptionReader) public: - TypeDescriptionReader() = default; - explicit TypeDescriptionReader(QString fileName, QString data) + QQmlJSTypeDescriptionReader() = default; + explicit QQmlJSTypeDescriptionReader(QString fileName, QString data) : m_fileName(std::move(fileName)), m_source(std::move(data)) {} bool operator()( @@ -92,4 +92,4 @@ private: QStringList *m_dependencies = nullptr; }; -#endif // TYPEDESCRIPTIONREADER_H +#endif // QQMLJSTYPEDESCRIPTIONREADER_P_H diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index 00b6d5b9ec..7f580fbe86 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -30,7 +30,7 @@ #include "checkidentifiers.h" #include <QtQmlCompiler/private/qqmljsscope_p.h> -#include <QtQmlCompiler/private/typedescriptionreader_p.h> +#include <QtQmlCompiler/private/qqmljstypedescriptionreader_p.h> #include <QtQmlCompiler/private/qqmljstypereader_p.h> #include <QtQml/private/qqmljsast_p.h> diff --git a/tools/qmllint/findwarnings.h b/tools/qmllint/findwarnings.h index fd9c84fee9..a48a765bde 100644 --- a/tools/qmllint/findwarnings.h +++ b/tools/qmllint/findwarnings.h @@ -42,7 +42,7 @@ #include "qcoloroutput.h" #include "checkidentifiers.h" -#include <QtQmlCompiler/private/typedescriptionreader_p.h> +#include <QtQmlCompiler/private/qqmljstypedescriptionreader_p.h> #include <QtQmlCompiler/private/qqmljsscope_p.h> #include <QtQmlCompiler/private/qqmljsimporter_p.h> |