summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2019-04-11 16:16:37 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2020-06-11 19:39:57 +0200
commit03107d0ccd4bed91b13f05c5ab36776e054dde8f (patch)
tree503d824a8468f73684297182f66e2641995a0997 /src/corelib/kernel/qmetaobject.cpp
parentd0689ec867244a25635fb9504f2e6ff6e5c4a77b (diff)
Add some support to flag alias properties
This is required if we want to be able to get rid of the property cache. Also reserve a flag for var properties, in case it turns out that we need to keep the distinction between var and QVariant properties in QML. Change-Id: I55c2191adcc2d94bd8f148216e26423defaa900f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
-rw-r--r--src/corelib/kernel/qmetaobject.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index add1f3b86e..a94c0c7d5f 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -3033,6 +3033,20 @@ bool QMetaProperty::hasStdCppSet() const
/*!
\internal
+
+ Returns \c true if the property is an alias.
+ This is for instance true for a property declared in QML
+ as 'property alias'.
+*/
+bool QMetaProperty::isAlias() const
+{
+ if (!mobj)
+ return false;
+ return (data.flags() & Alias);
+}
+
+/*!
+ \internal
Executes metacall with QMetaObject::RegisterPropertyMetaType flag.
Returns id of registered type or QMetaType::UnknownType if a type
could not be registered for any reason.