aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsmetatypes_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-11-13 13:40:56 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-11-18 08:54:47 +0100
commitdf179c52ec02aec91058d6977e08a405932af2bd (patch)
tree8415bb0adb85ecdfe43e2f0cd8182acb76c45dd9 /src/qmlcompiler/qqmljsmetatypes_p.h
parent7e3f5f2224ba0e57a9dffa6251bb002cde564f56 (diff)
QmlCompiler: Fix resolution of method and property types
We need to resolve the types for QML elements in two passes because only after finishing the parsing we have the QML-declared methods and properties available. We already need the base type before, though. Also, there can be multiple methods of the same name. We need API to access them. It also turns out that the internal name of the "var" type has to be QVariant in order to match reality. "var" properties and unnamed arguments to JS functions are implemented as QVariant. Change-Id: I541f11e96db72d832f4e4443d3a5d31079a56575 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsmetatypes_p.h')
-rw-r--r--src/qmlcompiler/qqmljsmetatypes_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qmlcompiler/qqmljsmetatypes_p.h b/src/qmlcompiler/qqmljsmetatypes_p.h
index 86a49c89c7..7d00eed199 100644
--- a/src/qmlcompiler/qqmljsmetatypes_p.h
+++ b/src/qmlcompiler/qqmljsmetatypes_p.h
@@ -156,6 +156,8 @@ public:
int revision() const { return m_revision; }
void setRevision(int r) { m_revision = r; }
+ bool isValid() const { return !m_name.isEmpty(); }
+
private:
QString m_name;
QString m_returnTypeName;