aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmllint/checkidentifiers.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-25 12:39:17 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-09-25 23:57:59 +0200
commitf0031c949ea6e5e6bc5dfb645e125e12192d425d (patch)
treeed76dd2ce06fdd63965b161d2a461c3a19cbd78a /tools/qmllint/checkidentifiers.h
parent8c8df9e02567f408a5b5516987459f9973d4d092 (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/checkidentifiers.h')
-rw-r--r--tools/qmllint/checkidentifiers.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/qmllint/checkidentifiers.h b/tools/qmllint/checkidentifiers.h
index 8fd605f454..653b398301 100644
--- a/tools/qmllint/checkidentifiers.h
+++ b/tools/qmllint/checkidentifiers.h
@@ -30,14 +30,15 @@
#define CHECKIDENTIFIERS_H
#include "scopetree.h"
+#include "findwarnings.h"
class ColorOutput;
class CheckIdentifiers
{
public:
- CheckIdentifiers(ColorOutput *colorOut, const QString &code, const QHash<QString,
- ScopeTree::Ptr> &types, const QString &fileName) :
+ CheckIdentifiers(ColorOutput *colorOut, const QString &code,
+ const FindWarningVisitor::ImportedTypes &types, const QString &fileName) :
m_colorOut(colorOut), m_code(code), m_types(types), m_fileName(fileName)
{}
@@ -52,7 +53,7 @@ private:
ColorOutput *m_colorOut = nullptr;
QString m_code;
- QHash<QString, ScopeTree::Ptr> m_types;
+ FindWarningVisitor::ImportedTypes m_types;
QString m_fileName;
};