aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject_p.h
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-03-23 14:16:43 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-27 05:17:13 +0200
commit965588737321d10fd1fbca3f89b4c6257b7b5d47 (patch)
tree95d069b6ce910c4f8bf8f71d50bebc4fe35a6b1f /src/qml/qml/qqmlvmemetaobject_p.h
parent4a161cfa0cf9167b575bdf7ff5685b9bf17c6960 (diff)
Restrict v8 property lookup to the execution context
When resolving property names, only properties known to the current context of execution should be available. If a property name has been overriden by a component extension, code executing in the context of the base component should resolve the property name to the property available inside the base component or its bases. Task-number: QTBUG-24891 Change-Id: I9687cc28e108226d5a939627a901c8254344b598 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject_p.h')
-rw-r--r--src/qml/qml/qqmlvmemetaobject_p.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h
index 3d70761563..8a3e02c5d8 100644
--- a/src/qml/qml/qqmlvmemetaobject_p.h
+++ b/src/qml/qml/qqmlvmemetaobject_p.h
@@ -187,6 +187,7 @@ protected:
public:
friend class QQmlVMEMetaObjectEndpoint;
friend class QQmlVMEVariantQObjectPtr;
+ friend class QQmlPropertyCache;
QObject *object;
QQmlGuardedContextData ctxt;
@@ -196,6 +197,7 @@ public:
inline int propOffset() const;
inline int methodOffset() const;
inline int signalOffset() const;
+ inline int signalCount() const;
bool hasAssignedMetaObjectData;
QQmlVMEVariant *data;
@@ -224,6 +226,8 @@ public:
QBiPointer<QDynamicMetaObjectData, const QMetaObject> parent;
+ inline QQmlVMEMetaObject *parentVMEMetaObject() const;
+
void listChanged(int);
class List : public QList<QObject*>
{
@@ -276,6 +280,19 @@ int QQmlVMEMetaObject::signalOffset() const
return cache->signalOffset();
}
+int QQmlVMEMetaObject::signalCount() const
+{
+ return cache->signalCount();
+}
+
+QQmlVMEMetaObject *QQmlVMEMetaObject::parentVMEMetaObject() const
+{
+ if (parent.isT1())
+ return static_cast<QQmlVMEMetaObject *>(parent.asT1());
+
+ return 0;
+}
+
QT_END_NAMESPACE
#endif // QQMLVMEMETAOBJECT_P_H