aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-04-19 10:59:41 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-04-19 13:07:10 +0200
commit3e08aa42497f7d264be039f31f4eedf639eda307 (patch)
tree871ee4f38715ab0111fe8e2c49756ca60390898e
parent190b376859ae9709e887886fcbaa56d60495be66 (diff)
Rename QQmlV8Handle to QQmlV4Handle
The handle wraps a V4 Value, so this is the better name for it. Also added some accessor methods to convert to and from V4 Values. Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/imports/particles/plugins.qmltypes8
-rw-r--r--src/imports/qtquick2/plugins.qmltypes14
-rw-r--r--src/imports/testlib/main.cpp10
-rw-r--r--src/imports/testlib/plugins.qmltypes6
-rw-r--r--src/imports/xmllistmodel/plugins.qmltypes2
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel.cpp6
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel_p.h2
-rw-r--r--src/particles/qquickcustomaffector.cpp10
-rw-r--r--src/particles/qquickcustomaffector_p.h2
-rw-r--r--src/particles/qquickparticleemitter.cpp6
-rw-r--r--src/particles/qquickparticleemitter_p.h2
-rw-r--r--src/particles/qquickparticlesystem.cpp2
-rw-r--r--src/particles/qquickparticlesystem_p.h4
-rw-r--r--src/particles/qquicktrailemitter.cpp8
-rw-r--r--src/particles/qquicktrailemitter_p.h2
-rw-r--r--src/particles/qquickv8particledata.cpp4
-rw-r--r--src/particles/qquickv8particledata_p.h2
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp4
-rw-r--r--src/qml/qml/qqmlengine.cpp2
-rw-r--r--src/qml/qml/qqmlglobal.cpp4
-rw-r--r--src/qml/qml/qqmlglobal_p.h4
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp4
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h6
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp4
-rw-r--r--src/qml/qml/v8/qv8engine.cpp15
-rw-r--r--src/qml/qml/v8/qv8engine_p.h21
-rw-r--r--src/qml/qml/v8/qv8qobjectwrapper.cpp22
-rw-r--r--src/qml/qml/v8/qv8valuetypewrapper.cpp2
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp16
-rw-r--r--src/qml/types/qqmldelegatemodel_p.h4
-rw-r--r--src/qml/types/qqmllistmodel.cpp8
-rw-r--r--src/qml/types/qqmllistmodel_p.h4
-rw-r--r--src/qml/types/qqmllistmodelworkeragent.cpp4
-rw-r--r--src/qml/types/qqmllistmodelworkeragent_p.h4
-rw-r--r--src/qml/types/qquickworkerscript.cpp2
-rw-r--r--src/qml/types/qquickworkerscript_p.h4
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp6
-rw-r--r--src/quick/items/context2d/qquickcanvasitem_p.h4
-rw-r--r--src/quick/util/qquickglobal.cpp12
39 files changed, 132 insertions, 114 deletions
diff --git a/src/imports/particles/plugins.qmltypes b/src/imports/particles/plugins.qmltypes
index 069b561b50..f8acb168b8 100644
--- a/src/imports/particles/plugins.qmltypes
+++ b/src/imports/particles/plugins.qmltypes
@@ -158,7 +158,7 @@ Module {
Property { name: "acceleration"; type: "QQuickDirection"; isPointer: true }
Signal {
name: "affectParticles"
- Parameter { name: "particles"; type: "QQmlV8Handle" }
+ Parameter { name: "particles"; type: "QQmlV4Handle" }
Parameter { name: "dt"; type: "double" }
}
Signal {
@@ -647,7 +647,7 @@ Module {
Property { name: "velocityFromMovement"; type: "double" }
Signal {
name: "emitParticles"
- Parameter { name: "particles"; type: "QQmlV8Handle" }
+ Parameter { name: "particles"; type: "QQmlV4Handle" }
}
Signal {
name: "particlesPerSecondChanged"
@@ -1052,8 +1052,8 @@ Module {
Property { name: "emitWidth"; type: "double" }
Signal {
name: "emitFollowParticles"
- Parameter { name: "particles"; type: "QQmlV8Handle" }
- Parameter { name: "followed"; type: "QQmlV8Handle" }
+ Parameter { name: "particles"; type: "QQmlV4Handle" }
+ Parameter { name: "followed"; type: "QQmlV4Handle" }
}
Signal {
name: "particlesPerParticlePerSecondChanged"
diff --git a/src/imports/qtquick2/plugins.qmltypes b/src/imports/qtquick2/plugins.qmltypes
index e5381629cc..aa24e39f85 100644
--- a/src/imports/qtquick2/plugins.qmltypes
+++ b/src/imports/qtquick2/plugins.qmltypes
@@ -777,7 +777,7 @@ Module {
}
Property { name: "available"; type: "bool"; isReadonly: true }
Property { name: "contextType"; type: "string" }
- Property { name: "context"; type: "QQmlV8Handle"; isReadonly: true }
+ Property { name: "context"; type: "QQmlV4Handle"; isReadonly: true }
Property { name: "canvasSize"; type: "QSizeF" }
Property { name: "tileSize"; type: "QSize" }
Property { name: "canvasWindow"; type: "QRectF" }
@@ -1818,13 +1818,13 @@ Module {
}
Method {
name: "get"
- type: "QQmlV8Handle"
+ type: "QQmlV4Handle"
Parameter { name: "index"; type: "int" }
}
Method {
name: "set"
Parameter { name: "index"; type: "int" }
- Parameter { type: "QQmlV8Handle" }
+ Parameter { type: "QQmlV4Handle" }
}
Method {
name: "setProperty"
@@ -3568,8 +3568,8 @@ Module {
Signal { name: "defaultIncludeChanged" }
Signal {
name: "changed"
- Parameter { name: "removed"; type: "QQmlV8Handle" }
- Parameter { name: "inserted"; type: "QQmlV8Handle" }
+ Parameter { name: "removed"; type: "QQmlV4Handle" }
+ Parameter { name: "inserted"; type: "QQmlV4Handle" }
}
Method {
name: "insert"
@@ -3605,7 +3605,7 @@ Module {
}
Method {
name: "get"
- type: "QQmlV8Handle"
+ type: "QQmlV4Handle"
Parameter { name: "index"; type: "int" }
}
}
@@ -3690,7 +3690,7 @@ Module {
Property { name: "source"; type: "QUrl" }
Signal {
name: "message"
- Parameter { name: "messageObject"; type: "QQmlV8Handle" }
+ Parameter { name: "messageObject"; type: "QQmlV4Handle" }
}
Method {
name: "sendMessage"
diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp
index 2ddb9deddc..c0ce046fd8 100644
--- a/src/imports/testlib/main.cpp
+++ b/src/imports/testlib/main.cpp
@@ -82,7 +82,7 @@ Q_SIGNALS:
public Q_SLOTS:
- QQmlV8Handle typeName(const QVariant& v) const
+ QQmlV4Handle typeName(const QVariant& v) const
{
QString name(v.typeName());
if (v.canConvert<QObject*>()) {
@@ -97,22 +97,22 @@ public Q_SLOTS:
}
}
- return QQmlV8Handle::fromHandle(v8::String::New(name.toUtf8()));
+ return QQmlV4Handle::fromV8Handle(v8::String::New(name.toUtf8()));
}
bool compare(const QVariant& act, const QVariant& exp) const {
return act == exp;
}
- QQmlV8Handle callerFile(int frameIndex = 0) const
+ QQmlV4Handle callerFile(int frameIndex = 0) const
{
v8::Local<v8::StackTrace> stacks = v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kDetailed);
int count = stacks->GetFrameCount();
if (count >= frameIndex + 1) {
v8::Local<v8::StackFrame> frame = stacks->GetFrame(frameIndex + 1);
- return QQmlV8Handle::fromHandle(frame->GetScriptNameOrSourceURL());
+ return QQmlV4Handle::fromV8Handle(frame->GetScriptNameOrSourceURL());
}
- return QQmlV8Handle();
+ return QQmlV4Handle();
}
int callerLine(int frameIndex = 0) const
{
diff --git a/src/imports/testlib/plugins.qmltypes b/src/imports/testlib/plugins.qmltypes
index 5d7c161926..5ad3f891f9 100644
--- a/src/imports/testlib/plugins.qmltypes
+++ b/src/imports/testlib/plugins.qmltypes
@@ -235,7 +235,7 @@ Module {
Property { name: "dragThreshold"; type: "int"; isReadonly: true }
Method {
name: "typeName"
- type: "QQmlV8Handle"
+ type: "QQmlV4Handle"
Parameter { name: "v"; type: "QVariant" }
}
Method {
@@ -246,10 +246,10 @@ Module {
}
Method {
name: "callerFile"
- type: "QQmlV8Handle"
+ type: "QQmlV4Handle"
Parameter { name: "frameIndex"; type: "int" }
}
- Method { name: "callerFile"; type: "QQmlV8Handle" }
+ Method { name: "callerFile"; type: "QQmlV4Handle" }
Method {
name: "callerLine"
type: "int"
diff --git a/src/imports/xmllistmodel/plugins.qmltypes b/src/imports/xmllistmodel/plugins.qmltypes
index 281a2adf05..c71899776f 100644
--- a/src/imports/xmllistmodel/plugins.qmltypes
+++ b/src/imports/xmllistmodel/plugins.qmltypes
@@ -39,7 +39,7 @@ Module {
Method { name: "reload" }
Method {
name: "get"
- type: "QQmlV8Handle"
+ type: "QQmlV4Handle"
Parameter { name: "index"; type: "int" }
}
Method { name: "errorString"; type: "string" }
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
index cc2b8d1548..fc918decdd 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
@@ -908,13 +908,13 @@ void QQuickXmlListModel::setNamespaceDeclarations(const QString &declarations)
var title = model.get(0).title;
\endjs
*/
-QQmlV8Handle QQuickXmlListModel::get(int index) const
+QQmlV4Handle QQuickXmlListModel::get(int index) const
{
// Must be called with a context and handle scope
Q_D(const QQuickXmlListModel);
if (index < 0 || index >= count())
- return QQmlV8Handle::fromHandle(v8::Undefined());
+ return QQmlV4Handle::fromV8Handle(v8::Undefined());
QQmlEngine *engine = qmlContext(this)->engine();
QV8Engine *v8engine = QQmlEnginePrivate::getV8Engine(engine);
@@ -923,7 +923,7 @@ QQmlV8Handle QQuickXmlListModel::get(int index) const
rv->Set(v8engine->toString(d->roleObjects[ii]->name()),
v8engine->fromVariant(d->data.value(ii).value(index)));
- return QQmlV8Handle::fromHandle(rv);
+ return QQmlV4Handle::fromV8Handle(rv);
}
/*!
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
index 0a11cc6e28..ca4b7cf811 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
@@ -107,7 +107,7 @@ public:
QString namespaceDeclarations() const;
void setNamespaceDeclarations(const QString&);
- Q_INVOKABLE QQmlV8Handle get(int index) const;
+ Q_INVOKABLE QQmlV4Handle get(int index) const;
enum Status { Null, Ready, Loading, Error };
Status status() const;
diff --git a/src/particles/qquickcustomaffector.cpp b/src/particles/qquickcustomaffector.cpp
index 99984bf804..c7fc7a7830 100644
--- a/src/particles/qquickcustomaffector.cpp
+++ b/src/particles/qquickcustomaffector.cpp
@@ -103,7 +103,7 @@ QQuickCustomAffector::QQuickCustomAffector(QQuickItem *parent) :
bool QQuickCustomAffector::isAffectConnected()
{
- IS_SIGNAL_CONNECTED(this, QQuickCustomAffector, affectParticles, (QQmlV8Handle,qreal));
+ IS_SIGNAL_CONNECTED(this, QQuickCustomAffector, affectParticles, (QQmlV4Handle,qreal));
}
void QQuickCustomAffector::affectSystem(qreal dt)
@@ -147,11 +147,11 @@ void QQuickCustomAffector::affectSystem(qreal dt)
v8::Context::Scope scope(QQmlEnginePrivate::getV8Engine(qmlEngine(this))->context());
v8::Handle<v8::Array> array = v8::Array::New(toAffect.size());
for (int i=0; i<toAffect.size(); i++)
- array->Set(i, toAffect[i]->v8Value().toHandle());
+ array->Set(i, toAffect[i]->v8Value().toV8Handle());
if (dt >= simulationCutoff || dt <= simulationDelta) {
affectProperties(toAffect, dt);
- emit affectParticles(QQmlV8Handle::fromHandle(array), dt);
+ emit affectParticles(QQmlV4Handle::fromV8Handle(array), dt);
} else {
int realTime = m_system->timeInt;
m_system->timeInt -= dt * 1000.0;
@@ -159,12 +159,12 @@ void QQuickCustomAffector::affectSystem(qreal dt)
m_system->timeInt += simulationDelta * 1000.0;
dt -= simulationDelta;
affectProperties(toAffect, simulationDelta);
- emit affectParticles(QQmlV8Handle::fromHandle(array), simulationDelta);
+ emit affectParticles(QQmlV4Handle::fromV8Handle(array), simulationDelta);
}
m_system->timeInt = realTime;
if (dt > 0.0) {
affectProperties(toAffect, dt);
- emit affectParticles(QQmlV8Handle::fromHandle(array), dt);
+ emit affectParticles(QQmlV4Handle::fromV8Handle(array), dt);
}
}
diff --git a/src/particles/qquickcustomaffector_p.h b/src/particles/qquickcustomaffector_p.h
index a4a077f864..1a12684c48 100644
--- a/src/particles/qquickcustomaffector_p.h
+++ b/src/particles/qquickcustomaffector_p.h
@@ -99,7 +99,7 @@ public:
signals:
- void affectParticles(QQmlV8Handle particles, qreal dt);
+ void affectParticles(QQmlV4Handle particles, qreal dt);
void positionChanged(QQuickDirection * arg);
diff --git a/src/particles/qquickparticleemitter.cpp b/src/particles/qquickparticleemitter.cpp
index b4e3a82cb2..4177f873e2 100644
--- a/src/particles/qquickparticleemitter.cpp
+++ b/src/particles/qquickparticleemitter.cpp
@@ -256,7 +256,7 @@ QQuickParticleEmitter::~QQuickParticleEmitter()
bool QQuickParticleEmitter::isEmitConnected()
{
- IS_SIGNAL_CONNECTED(this, QQuickParticleEmitter, emitParticles, (QQmlV8Handle));
+ IS_SIGNAL_CONNECTED(this, QQuickParticleEmitter, emitParticles, (QQmlV4Handle));
}
void QQuickParticleEmitter::componentComplete()
@@ -483,9 +483,9 @@ void QQuickParticleEmitter::emitWindow(int timeStamp)
v8::Context::Scope scope(QQmlEnginePrivate::getV8Engine(qmlEngine(this))->context());
v8::Handle<v8::Array> array = v8::Array::New(toEmit.size());
for (int i=0; i<toEmit.size(); i++)
- array->Set(i, toEmit[i]->v8Value().toHandle());
+ array->Set(i, toEmit[i]->v8Value().toV8Handle());
- emitParticles(QQmlV8Handle::fromHandle(array));//A chance for arbitrary JS changes
+ emitParticles(QQmlV4Handle::fromV8Handle(array));//A chance for arbitrary JS changes
}
m_last_emission = pt;
diff --git a/src/particles/qquickparticleemitter_p.h b/src/particles/qquickparticleemitter_p.h
index 70de934f6d..051e27816d 100644
--- a/src/particles/qquickparticleemitter_p.h
+++ b/src/particles/qquickparticleemitter_p.h
@@ -119,7 +119,7 @@ public:
void setVelocityFromMovement(qreal s);
virtual void componentComplete();
signals:
- void emitParticles(QQmlV8Handle particles);
+ void emitParticles(QQmlV4Handle particles);
void particlesPerSecondChanged(qreal);
void particleDurationChanged(int);
void enabledChanged(bool);
diff --git a/src/particles/qquickparticlesystem.cpp b/src/particles/qquickparticlesystem.cpp
index 1e59290ceb..2043eaffd3 100644
--- a/src/particles/qquickparticlesystem.cpp
+++ b/src/particles/qquickparticlesystem.cpp
@@ -527,7 +527,7 @@ void QQuickParticleData::clone(const QQuickParticleData& other)
animationOwner = other.animationOwner;
}
-QQmlV8Handle QQuickParticleData::v8Value()
+QQmlV4Handle QQuickParticleData::v8Value()
{
if (!v8Datum)
v8Datum = new QQuickV8ParticleData(QQmlEnginePrivate::getV8Engine(qmlEngine(system)), this);
diff --git a/src/particles/qquickparticlesystem_p.h b/src/particles/qquickparticlesystem_p.h
index 1177e30b8f..3b58fd139e 100644
--- a/src/particles/qquickparticlesystem_p.h
+++ b/src/particles/qquickparticlesystem_p.h
@@ -51,7 +51,7 @@
#include <private/qquicksprite_p.h>
#include <QAbstractAnimation>
#include <QtQml/qqml.h>
-#include <private/qv8engine_p.h> //For QQmlV8Handle
+#include <private/qv8engine_p.h> //For QQmlV4Handle
QT_BEGIN_NAMESPACE
@@ -228,7 +228,7 @@ public:
float lifeLeft();
float curSize();
void clone(const QQuickParticleData& other);//Not =, leaves meta-data like index
- QQmlV8Handle v8Value();
+ QQmlV4Handle v8Value();
void extendLife(float time);
private:
QQuickV8ParticleData* v8Datum;
diff --git a/src/particles/qquicktrailemitter.cpp b/src/particles/qquicktrailemitter.cpp
index 8b14626b54..244e35bb00 100644
--- a/src/particles/qquicktrailemitter.cpp
+++ b/src/particles/qquicktrailemitter.cpp
@@ -129,7 +129,7 @@ QQuickTrailEmitter::QQuickTrailEmitter(QQuickItem *parent) :
bool QQuickTrailEmitter::isEmitFollowConnected()
{
- IS_SIGNAL_CONNECTED(this, QQuickTrailEmitter, emitFollowParticles, (QQmlV8Handle,QQmlV8Handle));
+ IS_SIGNAL_CONNECTED(this, QQuickTrailEmitter, emitFollowParticles, (QQmlV4Handle,QQmlV4Handle));
}
void QQuickTrailEmitter::recalcParticlesPerSecond(){
@@ -273,12 +273,12 @@ void QQuickTrailEmitter::emitWindow(int timeStamp)
v8::Context::Scope scope(QQmlEnginePrivate::getV8Engine(qmlEngine(this))->context());
v8::Handle<v8::Array> array = v8::Array::New(toEmit.size());
for (int i=0; i<toEmit.size(); i++)
- array->Set(i, toEmit[i]->v8Value().toHandle());
+ array->Set(i, toEmit[i]->v8Value().toV8Handle());
if (isEmitFollowConnected())
- emitFollowParticles(QQmlV8Handle::fromHandle(array), d->v8Value());//A chance for many arbitrary JS changes
+ emitFollowParticles(QQmlV4Handle::fromV8Handle(array), d->v8Value());//A chance for many arbitrary JS changes
else if (isEmitConnected())
- emitParticles(QQmlV8Handle::fromHandle(array));//A chance for arbitrary JS changes
+ emitParticles(QQmlV4Handle::fromV8Handle(array));//A chance for arbitrary JS changes
}
m_lastEmission[d->index] = pt;
}
diff --git a/src/particles/qquicktrailemitter_p.h b/src/particles/qquicktrailemitter_p.h
index 3ae1507f1a..54041f1751 100644
--- a/src/particles/qquicktrailemitter_p.h
+++ b/src/particles/qquicktrailemitter_p.h
@@ -91,7 +91,7 @@ public:
}
signals:
- void emitFollowParticles(QQmlV8Handle particles, QQmlV8Handle followed);
+ void emitFollowParticles(QQmlV4Handle particles, QQmlV4Handle followed);
void particlesPerParticlePerSecondChanged(int arg);
diff --git a/src/particles/qquickv8particledata.cpp b/src/particles/qquickv8particledata.cpp
index 44f992c163..6aec8d3008 100644
--- a/src/particles/qquickv8particledata.cpp
+++ b/src/particles/qquickv8particledata.cpp
@@ -498,9 +498,9 @@ QQuickV8ParticleData::~QQuickV8ParticleData()
qPersistentDispose(m_v8Value);
}
-QQmlV8Handle QQuickV8ParticleData::v8Value()
+QQmlV4Handle QQuickV8ParticleData::v8Value()
{
- return QQmlV8Handle::fromHandle(m_v8Value);
+ return QQmlV4Handle::fromV8Handle(m_v8Value);
}
QT_END_NAMESPACE
diff --git a/src/particles/qquickv8particledata_p.h b/src/particles/qquickv8particledata_p.h
index e3c1bf9324..8c4e2ced1c 100644
--- a/src/particles/qquickv8particledata_p.h
+++ b/src/particles/qquickv8particledata_p.h
@@ -51,7 +51,7 @@ class QQuickV8ParticleData {
public:
QQuickV8ParticleData(QV8Engine*,QQuickParticleData*);
~QQuickV8ParticleData();
- QQmlV8Handle v8Value();
+ QQmlV4Handle v8Value();
private:
v8::Persistent<v8::Object> m_v8Value;
};
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index 49f6dec7fa..7ee21a79e4 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -241,8 +241,8 @@ void QQmlBoundSignalExpression::evaluate(void **a)
} else if (type == QMetaType::Int) {
//### optimization. Can go away if we switch to metaTypeToJS, or be expanded otherwise
args[ii] = v8::Integer::New(*reinterpret_cast<const int*>(a[ii + 1]));
- } else if (type == qMetaTypeId<QQmlV8Handle>()) {
- args[ii] = reinterpret_cast<QQmlV8Handle *>(a[ii + 1])->toHandle();
+ } else if (type == qMetaTypeId<QQmlV4Handle>()) {
+ args[ii] = reinterpret_cast<QQmlV4Handle *>(a[ii + 1])->toV8Handle();
} else if (ep->isQObject(type)) {
if (!*reinterpret_cast<void* const *>(a[ii + 1]))
args[ii] = v8::Null();
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 25ef080cb5..9a7b218ca7 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -740,7 +740,7 @@ void QQmlEnginePrivate::init()
qRegisterMetaType<QQmlComponent::Status>();
qRegisterMetaType<QList<QObject*> >();
qRegisterMetaType<QList<int> >();
- qRegisterMetaType<QQmlV8Handle>();
+ qRegisterMetaType<QQmlV4Handle>();
v8engine()->setEngine(q);
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp
index 607ee4d0ac..8418217ab9 100644
--- a/src/qml/qml/qqmlglobal.cpp
+++ b/src/qml/qml/qqmlglobal.cpp
@@ -181,7 +181,7 @@ QVariant QQmlValueTypeProvider::createVariantFromString(int type, const QString
return QVariant();
}
-QVariant QQmlValueTypeProvider::createVariantFromJsObject(int type, QQmlV8Handle obj, QV8Engine *e, bool *ok)
+QVariant QQmlValueTypeProvider::createVariantFromJsObject(int type, QQmlV4Handle obj, QV8Engine *e, bool *ok)
{
QVariant v;
@@ -262,7 +262,7 @@ bool QQmlValueTypeProvider::createFromString(int, const QString &, void *, size_
bool QQmlValueTypeProvider::createStringFrom(int, const void *, QString *) { return false; }
bool QQmlValueTypeProvider::variantFromString(const QString &, QVariant *) { return false; }
bool QQmlValueTypeProvider::variantFromString(int, const QString &, QVariant *) { return false; }
-bool QQmlValueTypeProvider::variantFromJsObject(int, QQmlV8Handle, QV8Engine *, QVariant *) { return false; }
+bool QQmlValueTypeProvider::variantFromJsObject(int, QQmlV4Handle, QV8Engine *, QVariant *) { return false; }
bool QQmlValueTypeProvider::equal(int, const void *, const void *, size_t) { return false; }
bool QQmlValueTypeProvider::store(int, const void *, void *, size_t) { return false; }
bool QQmlValueTypeProvider::read(int, const void *, size_t, int, void *) { return false; }
diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h
index 6ca54f65cd..c9eec4c23b 100644
--- a/src/qml/qml/qqmlglobal_p.h
+++ b/src/qml/qml/qqmlglobal_p.h
@@ -243,7 +243,7 @@ public:
QVariant createVariantFromString(const QString &);
QVariant createVariantFromString(int, const QString &, bool *);
- QVariant createVariantFromJsObject(int, QQmlV8Handle, QV8Engine *, bool*);
+ QVariant createVariantFromJsObject(int, QQmlV4Handle, QV8Engine *, bool*);
bool equalValueType(int, const void *, const void *, size_t);
bool storeValueType(int, const void *, void *, size_t);
@@ -263,7 +263,7 @@ private:
virtual bool variantFromString(const QString &, QVariant *);
virtual bool variantFromString(int, const QString &, QVariant *);
- virtual bool variantFromJsObject(int, QQmlV8Handle, QV8Engine *, QVariant *);
+ virtual bool variantFromJsObject(int, QQmlV4Handle, QV8Engine *, QVariant *);
virtual bool equal(int, const void *, const void *, size_t);
virtual bool store(int, const void *, void *, size_t);
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index b1ffc9a2d5..0ed649bdd1 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -117,8 +117,8 @@ static QQmlPropertyData::Flags flagsForPropertyType(int propType, QQmlEngine *en
flags |= QQmlPropertyData::IsQmlBinding;
} else if (propType == qMetaTypeId<QJSValue>()) {
flags |= QQmlPropertyData::IsQJSValue;
- } else if (propType == qMetaTypeId<QQmlV8Handle>()) {
- flags |= QQmlPropertyData::IsV8Handle;
+ } else if (propType == qMetaTypeId<QQmlV4Handle>()) {
+ flags |= QQmlPropertyData::IsV4Handle;
} else {
QQmlMetaType::TypeCategory cat =
engine ? QQmlEnginePrivate::get(engine)->typeCategory(propType)
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 63b8b79fd2..960f3e55d8 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -101,7 +101,7 @@ public:
IsQList = 0x00000800, // Property type is a QML list
IsQmlBinding = 0x00001000, // Property type is a QQmlBinding*
IsQJSValue = 0x00002000, // Property type is a QScriptValue
- IsV8Handle = 0x00004000, // Property type is a QQmlV8Handle
+ IsV4Handle = 0x00004000, // Property type is a QQmlV4Handle
IsVarProperty = 0x00008000, // Property type is a "var" property of VMEMO
IsValueTypeVirtual = 0x00010000, // Property is a value type "virtual" property
IsQVariant = 0x00020000, // Property is a QVariant
@@ -121,7 +121,7 @@ public:
// Flags that are set based on the propType field
PropTypeFlagMask = IsQObjectDerived | IsEnumType | IsQList | IsQmlBinding | IsQJSValue |
- IsV8Handle | IsQVariant,
+ IsV4Handle | IsQVariant,
};
Q_DECLARE_FLAGS(Flags, Flag)
@@ -144,7 +144,7 @@ public:
bool isQList() const { return flags & IsQList; }
bool isQmlBinding() const { return flags & IsQmlBinding; }
bool isQJSValue() const { return flags & IsQJSValue; }
- bool isV8Handle() const { return flags & IsV8Handle; }
+ bool isV4Handle() const { return flags & IsV4Handle; }
bool isVarProperty() const { return flags & IsVarProperty; }
bool isValueTypeVirtual() const { return flags & IsValueTypeVirtual; }
bool isQVariant() const { return flags & IsQVariant; }
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index d04cc4cee9..f68ffcc1d1 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -632,7 +632,7 @@ v8::Handle<v8::Value> font(const v8::Arguments &args)
v8::Handle<v8::Object> obj = args[0]->ToObject();
bool ok = false;
- QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QFont, QQmlV8Handle::fromHandle(obj), V8ENGINE(), &ok);
+ QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QFont, QQmlV4Handle::fromV8Handle(obj), V8ENGINE(), &ok);
if (!ok)
V8THROW_ERROR("Qt.font(): Invalid argument: no valid font subproperties specified");
return V8ENGINE()->fromVariant(v);
@@ -650,7 +650,7 @@ v8::Handle<v8::Value> matrix4x4(const v8::Arguments &args)
if (args.Length() == 1 && args[0]->IsObject()) {
v8::Handle<v8::Object> obj = args[0]->ToObject();
bool ok = false;
- QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QMatrix4x4, QQmlV8Handle::fromHandle(obj), V8ENGINE(), &ok);
+ QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QMatrix4x4, QQmlV4Handle::fromV8Handle(obj), V8ENGINE(), &ok);
if (!ok)
V8THROW_ERROR("Qt.matrix4x4(): Invalid argument: not a valid matrix4x4 values array");
return V8ENGINE()->fromVariant(v);
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index 9eaa7eaec9..c1b4c051cd 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -1573,5 +1573,20 @@ v8::Local<v8::String> QV8Engine::toString(const QString &string)
return QJSConverter::toString(string);
}
+
+QQmlJS::VM::Value QQmlV4Handle::toValue() const
+{
+ QQmlJS::VM::Value val;
+ val.val = d;
+ return val;
+}
+
+QQmlV4Handle QQmlV4Handle::fromValue(const QQmlJS::VM::Value &v)
+{
+ QQmlV4Handle handle;
+ handle.d = v.val;
+ return handle;
+}
+
QT_END_NAMESPACE
diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h
index fde5b63f9c..dbe90a7a10 100644
--- a/src/qml/qml/v8/qv8engine_p.h
+++ b/src/qml/qml/v8/qv8engine_p.h
@@ -203,21 +203,24 @@ private:
QV8Engine *_e;
};
-class QQmlV8Handle
+class QQmlV4Handle
{
public:
- QQmlV8Handle() : d(0) {}
- QQmlV8Handle(const QQmlV8Handle &other) : d(other.d) {}
- QQmlV8Handle &operator=(const QQmlV8Handle &other) { d = other.d; return *this; }
+ QQmlV4Handle() : d(0) {}
+ QQmlV4Handle(const QQmlV4Handle &other) : d(other.d) {}
+ QQmlV4Handle &operator=(const QQmlV4Handle &other) { d = other.d; return *this; }
- static QQmlV8Handle fromHandle(v8::Handle<v8::Value> h) {
- return QQmlV8Handle(h);
+ static QQmlV4Handle fromV8Handle(v8::Handle<v8::Value> h) {
+ return QQmlV4Handle(h);
}
- v8::Handle<v8::Value> toHandle() const {
+ v8::Handle<v8::Value> toV8Handle() const {
return v8::Value::NewFromInternalValue(d);
}
+
+ QQmlJS::VM::Value toValue() const;
+ static QQmlV4Handle fromValue(const QQmlJS::VM::Value &v);
private:
- QQmlV8Handle(v8::Handle<v8::Value> h) : d(h.val) {}
+ QQmlV4Handle(v8::Handle<v8::Value> h) : d(h.val) {}
quint64 d;
};
@@ -637,6 +640,6 @@ QV8Engine::Deletable *QV8Engine::extensionData(int index) const
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QQmlV8Handle)
+Q_DECLARE_METATYPE(QQmlV4Handle)
#endif // QQMLV8ENGINE_P_H
diff --git a/src/qml/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp
index b59d4806a8..15265517cc 100644
--- a/src/qml/qml/v8/qv8qobjectwrapper.cpp
+++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp
@@ -149,7 +149,7 @@ private:
QString,
QList<QObject *>,
QJSValue,
- QQmlV8Handle,
+ QQmlV4Handle,
QJsonArray,
QJsonObject,
QJsonValue>::Size];
@@ -162,7 +162,7 @@ private:
QVariant *qvariantPtr;
QList<QObject *> *qlistPtr;
QJSValue *qjsValuePtr;
- QQmlV8Handle *handlePtr;
+ QQmlV4Handle *handlePtr;
QJsonArray *jsonArrayPtr;
QJsonObject *jsonObjectPtr;
QJsonValue *jsonValuePtr;
@@ -426,10 +426,10 @@ static v8::Handle<v8::Value> LoadProperty(QV8Engine *engine, QObject *object,
double v = 0;
ReadFunction(object, property, &v, notifier);
return valueToHandle(engine, v);
- } else if (property.isV8Handle()) {
- QQmlV8Handle handle;
+ } else if (property.isV4Handle()) {
+ QQmlV4Handle handle;
ReadFunction(object, property, &handle, notifier);
- return handle.toHandle();
+ return handle.toV8Handle();
} else if (property.propType == qMetaTypeId<QJSValue>()) {
QJSValue v;
ReadFunction(object, property, &v, notifier);
@@ -2117,9 +2117,9 @@ void CallArgument::initAsType(int callType)
} else if (callType == qMetaTypeId<QList<QObject *> >()) {
type = callType;
qlistPtr = new (&allocData) QList<QObject *>();
- } else if (callType == qMetaTypeId<QQmlV8Handle>()) {
+ } else if (callType == qMetaTypeId<QQmlV4Handle>()) {
type = callType;
- handlePtr = new (&allocData) QQmlV8Handle;
+ handlePtr = new (&allocData) QQmlV4Handle;
} else if (callType == QMetaType::QJsonArray) {
type = callType;
jsonArrayPtr = new (&allocData) QJsonArray();
@@ -2183,8 +2183,8 @@ void CallArgument::fromValue(int callType, QV8Engine *engine, v8::Handle<v8::Val
qlistPtr->append(engine->toQObject(value));
}
type = callType;
- } else if (callType == qMetaTypeId<QQmlV8Handle>()) {
- handlePtr = new (&allocData) QQmlV8Handle(QQmlV8Handle::fromHandle(value));
+ } else if (callType == qMetaTypeId<QQmlV4Handle>()) {
+ handlePtr = new (&allocData) QQmlV4Handle(QQmlV4Handle::fromV8Handle(value));
type = callType;
} else if (callType == QMetaType::QJsonArray) {
jsonArrayPtr = new (&allocData) QJsonArray(engine->jsonArrayFromJS(value));
@@ -2258,8 +2258,8 @@ v8::Handle<v8::Value> CallArgument::toValue(QV8Engine *engine)
for (int ii = 0; ii < list.count(); ++ii)
array->Set(ii, engine->newQObject(list.at(ii)));
return array;
- } else if (type == qMetaTypeId<QQmlV8Handle>()) {
- return handlePtr->toHandle();
+ } else if (type == qMetaTypeId<QQmlV4Handle>()) {
+ return handlePtr->toV8Handle();
} else if (type == QMetaType::QJsonArray) {
return engine->jsonArrayToJS(*jsonArrayPtr);
} else if (type == QMetaType::QJsonObject) {
diff --git a/src/qml/qml/v8/qv8valuetypewrapper.cpp b/src/qml/qml/v8/qv8valuetypewrapper.cpp
index 99ee938e0c..42e40fd33e 100644
--- a/src/qml/qml/v8/qv8valuetypewrapper.cpp
+++ b/src/qml/qml/v8/qv8valuetypewrapper.cpp
@@ -192,7 +192,7 @@ QVariant QV8ValueTypeWrapper::toVariant(v8::Handle<v8::Object> obj, int typeHint
// NOTE: obj must not be an external resource object (ie, wrapper object)
// instead, it is a normal js object which one of the value-type providers
// may know how to convert to the given type.
- return QQml_valueTypeProvider()->createVariantFromJsObject(typeHint, QQmlV8Handle::fromHandle(obj), m_engine, succeeded);
+ return QQml_valueTypeProvider()->createVariantFromJsObject(typeHint, QQmlV4Handle::fromV8Handle(obj), m_engine, succeeded);
}
QVariant QV8ValueTypeWrapper::toVariant(v8::Handle<v8::Object> obj)
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index efbd98bdbc..56aed723e2 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -2095,7 +2095,7 @@ void QQmlDelegateModelGroupPrivate::setModel(QQmlDelegateModel *m, Compositor::G
bool QQmlDelegateModelGroupPrivate::isChangedConnected()
{
Q_Q(QQmlDelegateModelGroup);
- IS_SIGNAL_CONNECTED(q, QQmlDelegateModelGroup, changed, (const QQmlV8Handle &,const QQmlV8Handle &));
+ IS_SIGNAL_CONNECTED(q, QQmlDelegateModelGroup, changed, (const QQmlV4Handle &,const QQmlV4Handle &));
}
void QQmlDelegateModelGroupPrivate::emitChanges(QV8Engine *engine)
@@ -2106,7 +2106,7 @@ void QQmlDelegateModelGroupPrivate::emitChanges(QV8Engine *engine)
v8::Context::Scope contextScope(engine->context());
v8::Local<v8::Object> removed = engineData(engine)->array(engine, changeSet.removes());
v8::Local<v8::Object> inserted = engineData(engine)->array(engine, changeSet.inserts());
- emit q->changed(QQmlV8Handle::fromHandle(removed), QQmlV8Handle::fromHandle(inserted));
+ emit q->changed(QQmlV4Handle::fromV8Handle(removed), QQmlV4Handle::fromV8Handle(inserted));
}
if (changeSet.difference() != 0)
emit q->countChanged();
@@ -2296,18 +2296,18 @@ void QQmlDelegateModelGroup::setDefaultInclude(bool include)
\endlist
*/
-QQmlV8Handle QQmlDelegateModelGroup::get(int index)
+QQmlV4Handle QQmlDelegateModelGroup::get(int index)
{
Q_D(QQmlDelegateModelGroup);
if (!d->model)
- return QQmlV8Handle::fromHandle(v8::Undefined());;
+ return QQmlV4Handle::fromV8Handle(v8::Undefined());;
QQmlDelegateModelPrivate *model = QQmlDelegateModelPrivate::get(d->model);
if (!model->m_context->isValid()) {
- return QQmlV8Handle::fromHandle(v8::Undefined());
+ return QQmlV4Handle::fromV8Handle(v8::Undefined());
} else if (index < 0 || index >= model->m_compositor.count(d->group)) {
qmlInfo(this) << tr("get: index out of range");
- return QQmlV8Handle::fromHandle(v8::Undefined());
+ return QQmlV4Handle::fromV8Handle(v8::Undefined());
}
Compositor::iterator it = model->m_compositor.find(d->group, index);
@@ -2319,7 +2319,7 @@ QQmlV8Handle QQmlDelegateModelGroup::get(int index)
cacheItem = model->m_adaptorModel.createItem(
model->m_cacheMetaType, model->m_context->engine(), it.modelIndex());
if (!cacheItem)
- return QQmlV8Handle::fromHandle(v8::Undefined());
+ return QQmlV4Handle::fromV8Handle(v8::Undefined());
cacheItem->groups = it->flags;
model->m_cache.insert(it.cacheIndex, cacheItem);
@@ -2332,7 +2332,7 @@ QQmlV8Handle QQmlDelegateModelGroup::get(int index)
handle->SetExternalResource(cacheItem);
++cacheItem->scriptRef;
- return QQmlV8Handle::fromHandle(handle);
+ return QQmlV4Handle::fromV8Handle(handle);
}
bool QQmlDelegateModelGroupPrivate::parseIndex(
diff --git a/src/qml/types/qqmldelegatemodel_p.h b/src/qml/types/qqmldelegatemodel_p.h
index 5702c59787..d1cdd52bd3 100644
--- a/src/qml/types/qqmldelegatemodel_p.h
+++ b/src/qml/types/qqmldelegatemodel_p.h
@@ -165,7 +165,7 @@ public:
bool defaultInclude() const;
void setDefaultInclude(bool include);
- Q_INVOKABLE QQmlV8Handle get(int index);
+ Q_INVOKABLE QQmlV4Handle get(int index);
public Q_SLOTS:
void insert(QQmlV8Function *);
@@ -181,7 +181,7 @@ Q_SIGNALS:
void countChanged();
void nameChanged();
void defaultIncludeChanged();
- void changed(const QQmlV8Handle &removed, const QQmlV8Handle &inserted);
+ void changed(const QQmlV4Handle &removed, const QQmlV4Handle &inserted);
private:
Q_DECLARE_PRIVATE(QQmlDelegateModelGroup)
};
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index 725e5b2544..e84366ba8d 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -2119,7 +2119,7 @@ void QQmlListModel::append(QQmlV8Function *args)
\sa append()
*/
-QQmlV8Handle QQmlListModel::get(int index) const
+QQmlV4Handle QQmlListModel::get(int index) const
{
v8::Handle<v8::Value> result = v8::Undefined();
@@ -2135,7 +2135,7 @@ QQmlV8Handle QQmlListModel::get(int index) const
}
}
- return QQmlV8Handle::fromHandle(result);
+ return QQmlV4Handle::fromV8Handle(result);
}
/*!
@@ -2154,9 +2154,9 @@ QQmlV8Handle QQmlListModel::get(int index) const
\sa append()
*/
-void QQmlListModel::set(int index, const QQmlV8Handle &handle)
+void QQmlListModel::set(int index, const QQmlV4Handle &handle)
{
- v8::Handle<v8::Value> valuemap = handle.toHandle();
+ v8::Handle<v8::Value> valuemap = handle.toV8Handle();
if (!valuemap->IsObject() || valuemap->IsArray()) {
qmlInfo(this) << tr("set: value is not an object");
diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qml/types/qqmllistmodel_p.h
index 70477115bd..312abb6673 100644
--- a/src/qml/types/qqmllistmodel_p.h
+++ b/src/qml/types/qqmllistmodel_p.h
@@ -84,8 +84,8 @@ public:
Q_INVOKABLE void remove(QQmlV8Function *args);
Q_INVOKABLE void append(QQmlV8Function *args);
Q_INVOKABLE void insert(QQmlV8Function *args);
- Q_INVOKABLE QQmlV8Handle get(int index) const;
- Q_INVOKABLE void set(int index, const QQmlV8Handle &);
+ Q_INVOKABLE QQmlV4Handle get(int index) const;
+ Q_INVOKABLE void set(int index, const QQmlV4Handle &);
Q_INVOKABLE void setProperty(int index, const QString& property, const QVariant& value);
Q_INVOKABLE void move(int from, int to, int count);
Q_INVOKABLE void sync();
diff --git a/src/qml/types/qqmllistmodelworkeragent.cpp b/src/qml/types/qqmllistmodelworkeragent.cpp
index 9554e6d1e5..827fe03c61 100644
--- a/src/qml/types/qqmllistmodelworkeragent.cpp
+++ b/src/qml/types/qqmllistmodelworkeragent.cpp
@@ -147,12 +147,12 @@ void QQmlListModelWorkerAgent::insert(QQmlV8Function *args)
m_copy->insert(args);
}
-QQmlV8Handle QQmlListModelWorkerAgent::get(int index) const
+QQmlV4Handle QQmlListModelWorkerAgent::get(int index) const
{
return m_copy->get(index);
}
-void QQmlListModelWorkerAgent::set(int index, const QQmlV8Handle &value)
+void QQmlListModelWorkerAgent::set(int index, const QQmlV4Handle &value)
{
m_copy->set(index, value);
}
diff --git a/src/qml/types/qqmllistmodelworkeragent_p.h b/src/qml/types/qqmllistmodelworkeragent_p.h
index 614017069c..a76f66005b 100644
--- a/src/qml/types/qqmllistmodelworkeragent_p.h
+++ b/src/qml/types/qqmllistmodelworkeragent_p.h
@@ -84,8 +84,8 @@ public:
Q_INVOKABLE void remove(QQmlV8Function *args);
Q_INVOKABLE void append(QQmlV8Function *args);
Q_INVOKABLE void insert(QQmlV8Function *args);
- Q_INVOKABLE QQmlV8Handle get(int index) const;
- Q_INVOKABLE void set(int index, const QQmlV8Handle &);
+ Q_INVOKABLE QQmlV4Handle get(int index) const;
+ Q_INVOKABLE void set(int index, const QQmlV4Handle &);
Q_INVOKABLE void setProperty(int index, const QString& property, const QVariant& value);
Q_INVOKABLE void move(int from, int to, int count);
Q_INVOKABLE void sync();
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index ad09e1ec0c..474fdb0362 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -722,7 +722,7 @@ bool QQuickWorkerScript::event(QEvent *event)
v8::HandleScope handle_scope;
v8::Context::Scope scope(v8engine->context());
v8::Handle<v8::Value> value = QV8Worker::deserialize(workerEvent->data(), v8engine);
- emit message(QQmlV8Handle::fromHandle(value));
+ emit message(QQmlV4Handle::fromV8Handle(value));
}
return true;
} else if (event->type() == (QEvent::Type)WorkerErrorEvent::WorkerError) {
diff --git a/src/qml/types/qquickworkerscript_p.h b/src/qml/types/qquickworkerscript_p.h
index 1ab5208e45..7921b90295 100644
--- a/src/qml/types/qquickworkerscript_p.h
+++ b/src/qml/types/qquickworkerscript_p.h
@@ -85,7 +85,7 @@ private:
};
class QQmlV8Function;
-class QQmlV8Handle;
+class QQmlV4Handle;
class Q_AUTOTEST_EXPORT QQuickWorkerScript : public QObject, public QQmlParserStatus
{
Q_OBJECT
@@ -104,7 +104,7 @@ public slots:
signals:
void sourceChanged();
- void message(const QQmlV8Handle &messageObject);
+ void message(const QQmlV4Handle &messageObject);
protected:
virtual void classBegin();
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index 4650488705..531fac825d 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -362,13 +362,13 @@ void QQuickCanvasItem::setContextType(const QString &contextType)
this property will contain the current drawing context, otherwise null.
*/
-QQmlV8Handle QQuickCanvasItem::context() const
+QQmlV4Handle QQuickCanvasItem::context() const
{
Q_D(const QQuickCanvasItem);
if (d->contextInitialized)
- return QQmlV8Handle::fromHandle(d->context->v8value());
+ return QQmlV4Handle::fromV8Handle(d->context->v8value());
- return QQmlV8Handle::fromHandle(v8::Null());
+ return QQmlV4Handle::fromV8Handle(v8::Null());
}
/*!
diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h
index c53e4f952a..09c3802563 100644
--- a/src/quick/items/context2d/qquickcanvasitem_p.h
+++ b/src/quick/items/context2d/qquickcanvasitem_p.h
@@ -85,7 +85,7 @@ class QQuickCanvasItem : public QQuickItem
Q_PROPERTY(bool available READ isAvailable NOTIFY availableChanged)
Q_PROPERTY(QString contextType READ contextType WRITE setContextType NOTIFY contextTypeChanged)
- Q_PROPERTY(QQmlV8Handle context READ context NOTIFY contextChanged)
+ Q_PROPERTY(QQmlV4Handle context READ context NOTIFY contextChanged)
Q_PROPERTY(QSizeF canvasSize READ canvasSize WRITE setCanvasSize NOTIFY canvasSizeChanged)
Q_PROPERTY(QSize tileSize READ tileSize WRITE setTileSize NOTIFY tileSizeChanged)
Q_PROPERTY(QRectF canvasWindow READ canvasWindow WRITE setCanvasWindow NOTIFY canvasWindowChanged)
@@ -112,7 +112,7 @@ public:
QString contextType() const;
void setContextType(const QString &contextType);
- QQmlV8Handle context() const;
+ QQmlV4Handle context() const;
QSizeF canvasSize() const;
void setCanvasSize(const QSizeF &);
diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp
index 3ea1bc73ad..202c0b3def 100644
--- a/src/quick/util/qquickglobal.cpp
+++ b/src/quick/util/qquickglobal.cpp
@@ -309,11 +309,11 @@ public:
return QMatrix4x4();
}
- static QFont fontFromObject(QQmlV8Handle object, QV8Engine *e, bool *ok)
+ static QFont fontFromObject(QQmlV4Handle object, QV8Engine *e, bool *ok)
{
if (ok) *ok = false;
QFont retn;
- v8::Handle<v8::Object> obj = object.toHandle()->ToObject();
+ v8::Handle<v8::Object> obj = object.toV8Handle()->ToObject();
v8::Handle<v8::Value> vbold = obj->Get(v8::String::New("bold"));
v8::Handle<v8::Value> vcap = obj->Get(v8::String::New("capitalization"));
@@ -376,10 +376,10 @@ public:
return retn;
}
- static QMatrix4x4 matrix4x4FromObject(QQmlV8Handle object, bool *ok)
+ static QMatrix4x4 matrix4x4FromObject(QQmlV4Handle object, bool *ok)
{
if (ok) *ok = false;
- v8::Handle<v8::Object> obj = object.toHandle()->ToObject();
+ v8::Handle<v8::Object> obj = object.toV8Handle()->ToObject();
if (!obj->IsArray())
return QMatrix4x4();
@@ -746,10 +746,10 @@ public:
return false;
}
- bool variantFromJsObject(int type, QQmlV8Handle object, QV8Engine *e, QVariant *v)
+ bool variantFromJsObject(int type, QQmlV4Handle object, QV8Engine *e, QVariant *v)
{
// must be called with a valid v8 context.
- Q_ASSERT(object.toHandle()->IsObject());
+ Q_ASSERT(object.toV8Handle()->IsObject());
bool ok = false;
switch (type) {
case QMetaType::QFont: