aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-03-30 10:47:39 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2021-03-30 15:04:17 +0200
commit8a3bf4e2969b2f668ce06e996a8d601f834702bd (patch)
tree71e2cbeb712ba205db2b484aef802188bab3382f /src/qmlcompiler
parentb527d8db601c13fe6d0f19cfa24d42c934ba6a78 (diff)
Add QQmlJSMetaProperty::isValid()
*Method and *Enum already have one, so *Property should have one also Change-Id: Ia3a7b2a082f88296ee97af7343c68c5529d5220f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler')
-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 661344bd5c..6949a042d5 100644
--- a/src/qmlcompiler/qqmljsmetatypes_p.h
+++ b/src/qmlcompiler/qqmljsmetatypes_p.h
@@ -292,6 +292,8 @@ public:
void setRevision(int revision) { m_revision = revision; }
int revision() const { return m_revision; }
+ bool isValid() const { return !m_propertyName.isEmpty(); }
+
friend bool operator==(const QQmlJSMetaProperty &a, const QQmlJSMetaProperty &b)
{
return a.m_propertyName == b.m_propertyName