diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-25 12:39:17 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-25 23:57:59 +0200 |
commit | f0031c949ea6e5e6bc5dfb645e125e12192d425d (patch) | |
tree | ed76dd2ce06fdd63965b161d2a461c3a19cbd78a /tools/qmllint/findwarnings.h | |
parent | 8c8df9e02567f408a5b5516987459f9973d4d092 (diff) |
TypeDescriptionReader: Don't export C++ names as QML names
This is just wrong. The types are not visible in QML under their C++
names. Indeed, this way we reveal a number of places where we confuse
the names. Fix those in turn.
Furthermore, one of the tests was incorrect. The qmltypes files did not
contain an export entry for one of the types, and therefore the type was
formally anonymous in QML. However, we did access it via its C++ name.
Fix that by exporting the C++ name.
Change-Id: I8dd96334076b90fb174daf5b285d622f96495f56
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint/findwarnings.h')
-rw-r--r-- | tools/qmllint/findwarnings.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/qmllint/findwarnings.h b/tools/qmllint/findwarnings.h index 7e3ea14128..2c7fe5ce05 100644 --- a/tools/qmllint/findwarnings.h +++ b/tools/qmllint/findwarnings.h @@ -53,13 +53,6 @@ class FindWarningVisitor : public QQmlJS::AST::Visitor { Q_DISABLE_COPY_MOVE(FindWarningVisitor) public: - explicit FindWarningVisitor( - QStringList qmltypeDirs, QStringList qmltypesFiles, QString code, QString fileName, - bool silent, bool warnUnqualified, bool warnWithStatement, bool warnInheritanceCycle); - ~FindWarningVisitor() override = default; - bool check(); - -private: struct ImportedTypes { // C++ names used in qmltypes files for non-composite types @@ -72,6 +65,13 @@ private: QHash<QString, ScopeTree::Ptr> importedQmlNames; }; + explicit FindWarningVisitor( + QStringList qmltypeDirs, QStringList qmltypesFiles, QString code, QString fileName, + bool silent, bool warnUnqualified, bool warnWithStatement, bool warnInheritanceCycle); + ~FindWarningVisitor() override = default; + bool check(); + +private: class Importer { public: |