aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v8/qv8qobjectwrapper_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-06-07 13:19:27 +1000
committerAaron Kennedy <aaron.kennedy@nokia.com>2011-06-07 17:00:11 +1000
commit1c3dd8f22da09bf9a110715d159374a09c27dc77 (patch)
tree034a820adb81885c5082e8102605e99e5b5db767 /src/declarative/qml/v8/qv8qobjectwrapper_p.h
parent26942a682c82bd347da65b143442d53d58533263 (diff)
Allow the same QObject to be used in multiple QDeclarativeEngines
Diffstat (limited to 'src/declarative/qml/v8/qv8qobjectwrapper_p.h')
-rw-r--r--src/declarative/qml/v8/qv8qobjectwrapper_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/qml/v8/qv8qobjectwrapper_p.h b/src/declarative/qml/v8/qv8qobjectwrapper_p.h
index f63396945e..5100c3f51b 100644
--- a/src/declarative/qml/v8/qv8qobjectwrapper_p.h
+++ b/src/declarative/qml/v8/qv8qobjectwrapper_p.h
@@ -63,9 +63,11 @@ QT_BEGIN_NAMESPACE
class QObject;
class QV8Engine;
+class QDeclarativeData;
class QV8ObjectResource;
-class QDeclarativePropertyCache;
+class QV8QObjectInstance;
class QV8QObjectConnectionList;
+class QDeclarativePropertyCache;
class Q_AUTOTEST_EXPORT QV8QObjectWrapper
{
public:
@@ -87,7 +89,9 @@ public:
private:
friend class QDeclarativePropertyCache;
friend class QV8QObjectConnectionList;
+ friend class QV8QObjectInstance;
+ v8::Local<v8::Object> newQObject(QObject *, QDeclarativeData *, QV8Engine *);
static v8::Handle<v8::Value> GetProperty(QV8Engine *, QObject *, v8::Handle<v8::Value> *,
v8::Handle<v8::String>, QV8QObjectWrapper::RevisionMode);
static bool SetProperty(QV8Engine *, QObject *, v8::Handle<v8::String>,
@@ -106,12 +110,15 @@ private:
static QPair<QObject *, int> ExtractQtMethod(QV8Engine *, v8::Handle<v8::Function>);
QV8Engine *m_engine;
+ quint32 m_id;
v8::Persistent<v8::Function> m_constructor;
v8::Persistent<v8::Function> m_methodConstructor;
v8::Persistent<v8::String> m_toStringSymbol;
v8::Persistent<v8::String> m_destroySymbol;
v8::Persistent<v8::Object> m_hiddenObject;
QHash<QObject *, QV8QObjectConnectionList *> m_connections;
+ typedef QHash<QObject *, QV8QObjectInstance *> TaintedHash;
+ TaintedHash m_taintedObjects;
};
QT_END_NAMESPACE