Don't include v8.h from qv8engine_p.h anymore
authorLars Knoll <lars.knoll@digia.com>
Mon, 10 Jun 2013 13:59:06 +0000 (15:59 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Mon, 10 Jun 2013 14:08:46 +0000 (16:08 +0200)
Change-Id: Idb0f5744f65b28acbe878a3e9d33b4a3946ecab8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/particles/qquickv8particledata.cpp
src/qml/qml/qqmlxmlhttprequest.cpp
src/qml/qml/v4/qv4serialize.cpp
src/qml/qml/v8/qv8engine.cpp
src/qml/qml/v8/qv8engine_p.h
src/qml/qml/v8/qv8objectresource_p.h
src/quick/items/context2d/qquickcontext2d.cpp

index 9d0307e..a4a0298 100644 (file)
@@ -46,6 +46,8 @@
 #include <private/qv4engine_p.h>
 #include <private/qv4functionobject_p.h>
 
+#include <private/qv8objectresource_p.h>
+
 QT_BEGIN_NAMESPACE
 
 /*!
index af34e99..597c12d 100644 (file)
@@ -63,6 +63,9 @@
 #include <QtCore/qstack.h>
 #include <QtCore/qdebug.h>
 
+#include <private/qv4v8_p.h>
+#include <private/qv8objectresource_p.h>
+
 #ifndef QT_NO_XMLSTREAMREADER
 
 #define V8THROW_REFERENCE(string) { \
index a9b95ce..0860e27 100644 (file)
@@ -51,6 +51,9 @@
 #include <private/qv4sequenceobject_p.h>
 #include <private/qv4objectproto_p.h>
 
+#include <private/qv4v8_p.h>
+#include <private/qv8objectresource_p.h>
+
 QT_BEGIN_NAMESPACE
 
 using namespace QV4;
index fcd5268..8ef670d 100644 (file)
@@ -78,6 +78,9 @@
 #include <private/qv4include_p.h>
 #include <private/qv4jsonobject_p.h>
 
+#include <private/qv4v8_p.h>
+#include <private/qv8objectresource_p.h>
+
 Q_DECLARE_METATYPE(QList<int>)
 
 
@@ -403,7 +406,7 @@ QVariant QV8Engine::toBasicVariant(const QV4::Value &value)
 
 
 
-void QV8Engine::initializeGlobal(v8::Handle<v8::Object> global)
+void QV8Engine::initializeGlobal()
 {
     QV4::GlobalExtensions::init(m_engine, m_v4Engine->globalObject);
 
@@ -490,7 +493,7 @@ void QV8Engine::setExtensionData(int index, Deletable *data)
 
 void QV8Engine::initQmlGlobalObject()
 {
-    initializeGlobal(QV4::Value::fromObject(m_v4Engine->globalObject));
+    initializeGlobal();
     freezeObject(QV4::Value::fromObject(m_v4Engine->globalObject));
 }
 
index c7508ba..c69c692 100644 (file)
@@ -62,7 +62,6 @@
 #include <QtCore/QElapsedTimer>
 #include <QtCore/QThreadStorage>
 
-#include <private/qv8_p.h>
 #include <qjsengine.h>
 #include <qjsvalue.h>
 #include "qjsvalueiterator_p.h"
@@ -70,7 +69,6 @@
 
 #include <private/qqmlpropertycache_p.h>
 
-#include "qv8objectresource_p.h"
 #include <private/qv4qobjectwrapper_p.h>
 #include <private/qv4value_p.h>
 #include <private/qv4object_p.h>
@@ -137,19 +135,6 @@ namespace QV4 {
         return rv; \
     } \
 
-template<class T>
-inline T *v8_resource_cast(v8::Handle<v8::Object> object) {
-    QV8ObjectResource *resource = static_cast<QV8ObjectResource *>(object->GetExternalResource());
-    return (resource && (quint32)resource->resourceType() == (quint32)T::V8ResourceType)?static_cast<T *>(resource):0;
-}
-
-template<class T>
-inline T *v8_resource_check(v8::Handle<v8::Object> object) {
-    T *resource = static_cast<T *>(object->GetExternalResource());
-    Q_ASSERT(resource && resource->resourceType() == (quint32)T::V8ResourceType);
-    return resource;
-}
-
 // Used to allow a QObject method take and return raw V8 handles without having to expose
 // v8 in the public API.
 // Use like this:
@@ -324,7 +309,7 @@ protected:
 
     QVariant toBasicVariant(const QV4::Value &);
 
-    void initializeGlobal(v8::Handle<v8::Object>);
+    void initializeGlobal();
 
 private:
     QVariantList variantListFromJS(QV4::ArrayObject *array, V8ObjectSet &visitedObjects);
index ad35abc..a112a33 100644 (file)
@@ -77,6 +77,19 @@ public:
     QV8Engine *engine;
 };
 
+template<class T>
+inline T *v8_resource_cast(v8::Handle<v8::Object> object) {
+    QV8ObjectResource *resource = static_cast<QV8ObjectResource *>(object->GetExternalResource());
+    return (resource && (quint32)resource->resourceType() == (quint32)T::V8ResourceType)?static_cast<T *>(resource):0;
+}
+
+template<class T>
+inline T *v8_resource_check(v8::Handle<v8::Object> object) {
+    T *resource = static_cast<T *>(object->GetExternalResource());
+    Q_ASSERT(resource && resource->resourceType() == (quint32)T::V8ResourceType);
+    return resource;
+}
+
 QT_END_NAMESPACE
 
 #endif // QV8OBJECTRESOURCE_P_H
index bf06d92..986290d 100644 (file)
@@ -68,6 +68,8 @@
 #include <private/qv4value_p.h>
 #include <private/qv4functionobject_p.h>
 
+#include <private/qv8objectresource_p.h>
+
 #if defined(Q_OS_QNX) || defined(Q_OS_ANDROID)
 #include <ctype.h>
 #endif