summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativepropertycache_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-03-10 05:56:38 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-03-10 06:18:18 (GMT)
commit46dfe1e6dad1f3a74cb15bfd538e9fe28ffac5b3 (patch)
tree160c9ce10c08d10d3ab92508384d02423bc58bf4 /src/declarative/qml/qdeclarativepropertycache_p.h
parentb5be801a5277cf63185f36d2ca1557b941340ce3 (diff)
downloadQt-46dfe1e6dad1f3a74cb15bfd538e9fe28ffac5b3.zip
Qt-46dfe1e6dad1f3a74cb15bfd538e9fe28ffac5b3.tar.gz
Qt-46dfe1e6dad1f3a74cb15bfd538e9fe28ffac5b3.tar.bz2
Unify binding optimizer and QtScript binding signal management logic
Diffstat (limited to 'src/declarative/qml/qdeclarativepropertycache_p.h')
-rw-r--r--src/declarative/qml/qdeclarativepropertycache_p.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h
index 68e6e6b..ea2f01a 100644
--- a/src/declarative/qml/qdeclarativepropertycache_p.h
+++ b/src/declarative/qml/qdeclarativepropertycache_p.h
@@ -55,15 +55,16 @@
#include "qdeclarativerefcount_p.h"
#include "qdeclarativecleanup_p.h"
+#include "qdeclarativenotifier_p.h"
#include <QtCore/qvector.h>
#include <QtScript/private/qscriptdeclarativeclass_p.h>
-
QT_BEGIN_NAMESPACE
class QDeclarativeEngine;
class QMetaProperty;
+
class QDeclarativePropertyCache : public QDeclarativeRefCount, public QDeclarativeCleanup
{
public:
@@ -81,11 +82,12 @@ public:
IsConstant = 0x00000001,
IsWritable = 0x00000002,
IsResettable = 0x00000004,
+ HasNotify = 0x00000008,
// These are mutualy exclusive
- IsFunction = 0x00000008,
- IsQObjectDerived = 0x00000010,
- IsEnumType = 0x00000020,
+ IsFunction = 0x00000010,
+ IsQObjectDerived = 0x00000020,
+ IsEnumType = 0x00000040,
IsQList = 0x00000080,
IsQmlBinding = 0x00000100,
IsQScriptValue = 0x00000200,
@@ -97,11 +99,17 @@ public:
};
Q_DECLARE_FLAGS(Flags, Flag)
+ enum Call { ReadProperty, WriteProperty, ConnectNotify, DisconnectNotify };
+ typedef void (*MetaCall)(QObject *, Call, void *);
+
bool isValid() const { return coreIndex != -1; }
Flags flags;
int propType;
- int coreIndex;
+ union {
+ MetaCall call;
+ int coreIndex;
+ };
int notifyIndex;
static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine = 0);
@@ -136,6 +144,7 @@ public:
inline QDeclarativeEngine *qmlEngine() const;
static Data *property(QDeclarativeEngine *, QObject *, const QScriptDeclarativeClass::Identifier &, Data &);
static Data *property(QDeclarativeEngine *, QObject *, const QString &, Data &);
+ static Data property(const QMetaObject *, const char *);
protected:
virtual void clear();